MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ triangle()

TimeMap MayaFlux::Kinesis::TimeMaps::triangle ( double  lo,
double  hi,
double  velocity,
double  start 
)
inline

Triangle wave between two positions.

Parameters
loLower turning point
hiUpper turning point
velocitySpeed in position units per second, negative starts downward
startPosition at time zero, folded into [lo, hi]

Definition at line 78 of file TimeMap.hpp.

79{
80 return { .fn = [lo, hi, velocity, start](const double& t) -> double {
81 return ping_pong<double>(start + velocity * t, lo, hi);
82 } };
83}
T velocity(const Memory::HistoryBuffer< T > &history, double dt) noexcept
First difference: rate of change of position.

References MayaFlux::Kinesis::Tendency< D, R >::fn, and MayaFlux::Kinesis::velocity().

+ Here is the call graph for this function: