hx3d
1
2D/3D Simple Game Framework
|
Math function definition. More...
#include <function.hpp>
Public Member Functions | |
Function (float init, float speed, std::function< void(float &, float &, float)> func) | |
Create a function from an initial time value, speed and a math function. More... | |
void | reset () |
Reset the function time. | |
void | step () |
Step the function time. | |
glm::vec2 | sample () |
Sample the current coordinates from the math function. More... | |
Math function definition.
Definition at line 33 of file function.hpp.
hx3d::math::Function::Function | ( | float | init, |
float | speed, | ||
std::function< void(float &, float &, float)> | func | ||
) |
Create a function from an initial time value, speed and a math function.
The math function takes 3 parameters:
init | Initial time value |
speed | Speed |
func | Math function |
Definition at line 26 of file function.cpp.
glm::vec2 hx3d::math::Function::sample | ( | ) |
Sample the current coordinates from the math function.
Definition at line 34 of file function.cpp.