wavelength 1.0.0
Loading...
Searching...
No Matches
quadraticapproach.h
Go to the documentation of this file.
1#pragma once
2
3#include "math/vector3.h"
4
11public:
22 QuadraticApproach(const Vector3 &coeffs, float fValue, float fMaxSpeed);
23
31
44 float Step(float fDelta, float fTarget);
45
47 float GetValue() const {
48 return mValue;
49 }
50
58 void SetCurve(const Vector3 &coeffs, float flMaxSpeed) {
59 mSquare = coeffs.x;
60 mLinear = coeffs.y;
61 mConstant = coeffs.z;
62 mMaxSpeed = flMaxSpeed;
63 }
64
65private:
66 float mSquare;
67 float mLinear;
68 float mConstant;
69 float mMaxSpeed;
70 float mValue;
71};
float GetValue() const
Definition quadraticapproach.h:47
~QuadraticApproach()
Destroy the value.
void SetCurve(const Vector3 &coeffs, float flMaxSpeed)
Set the curve and the greatest speed.
Definition quadraticapproach.h:58
float Step(float fDelta, float fTarget)
Move the value toward a target without passing it.
QuadraticApproach(const Vector3 &coeffs, float fValue, float fMaxSpeed)
Construct a value at rest.
Three-component vector, padded to a PlayStation 2 quadword.
Definition vector3.h:14
float x
Definition vector3.h:15
float y
Definition vector3.h:16
float z
Definition vector3.h:17