Template Class Ramp2D

Class Documentation

template<typename ValueUnit, typename TimeUnit>
class Ramp2D

Public Types

using Vector2D = fang::math::Vector2D<ValueUnit>

Public Functions

inline Ramp2D(const Vector2D &initialValue, double rampSpeed)

Ramp speed is how much value unit per time unit

inline void setTarget(const Vector2D &target)
inline Vector2D getTarget() const
inline void setSpeed(double speed)

The speed of the ramps are only changed if a non-zero delta between the curretn values and target values are different

inline Vector2D getValue() const
inline bool isTargetReached() const
inline void update()