Minimal library for running user defined behaviour stepwise over a specific amount of time.
Stepwise interpolation from 0.0
to 1.0
using a cubic method over 2 seconds.
interp::Interpolator interp([&](double value, uint64_t elapsedMs) mutable {
// define stepwise behaviour here
std::cout << "[" << elapsedMs << "\t" << value << "]\n";
return true; // return false to abort
}, 2000);
interp.setEasing(interp::InterpolatorMethod::cube); // default is linear
interp.setFrequency(120); // default is 60hz
interp.run();
Exclusively for running the included example.cpp
to render outputs as a graph. The library itself does not have any special requirements.
- python
- numpy
- matplotlib
matplotlib-cpp
Some sanity checks might have to be manually commented out in matplotlib-cpp
.