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

◆ quadratic()

TimeMap MayaFlux::Kinesis::TimeMaps::quadratic ( double  start,
double  velocity,
double  acceleration 
)
inline

Constant acceleration from an initial velocity.

Parameters
startPosition at time zero
velocityInitial velocity in position units per second, negative reverses
accelerationChange of velocity per second, negative decelerates

Position is start + velocity * t + acceleration * t^2 / 2 for t >= 0.

Definition at line 63 of file TimeMap.hpp.

64{
65 return { .fn = [start, velocity, acceleration](const double& t) -> double {
66 const double s = std::max(t, 0.0);
67 return start + velocity * s + 0.5 * acceleration * s * s;
68 } };
69}
T acceleration(const Memory::HistoryBuffer< T > &history, double dt) noexcept
Second difference: rate of change of velocity.
T velocity(const Memory::HistoryBuffer< T > &history, double dt) noexcept
First difference: rate of change of position.

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

+ Here is the call graph for this function: