|
Fang-Robotics-MCB
Fang Robotics Team Codebase
|
#include <cool_lerp.hpp>
Public Types | |
| using | Vector2D = math::Vector2D< double > |
Public Member Functions | |
| CoolLerp (const Vector2D &dataPoint1, const Vector2D &dataPoint2) | |
| double | interpolate (double input) const |
This interpolates arbitrary values between two datapoints x is input, y is the output for that given input
This is not as convoluted as modm's lerp but it's more capable than std::lerp Hence, it is the coolest lerp :D
| using fang::math::CoolLerp::Vector2D = math::Vector2D<double> |
x corresponds to the intput y corresponds to the output dataPoint1 should have the lesser input value The datapoints should have different input values to have a defined slope.
| double fang::math::CoolLerp::interpolate | ( | double | input | ) | const |