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

◆ damp_asymmetric() [1/2]

void MayaFlux::Kinesis::damp_asymmetric ( std::span< double >  current,
std::span< const double >  target,
std::span< const double >  rise,
std::span< const double >  fall,
double  dt 
)
inlinenoexcept

damp_asymmetric over arrays, in place.

Parameters
currentLevels, updated
targetWhere each level is heading
riseRise time constant per level
fallFall time constant per level
dtTime step

Runs over the shortest of the four spans. Each level has its own pair of numbers, so levels given different values move independently.

Definition at line 175 of file Scalar.hpp.

181{
182 const size_t count = std::min({ current.size(), target.size(), rise.size(), fall.size() });
183 for (size_t i = 0; i < count; ++i)
184 current[i] = damp_asymmetric(current[i], target[i], rise[i], fall[i], dt);
185}
glm::vec2 current
size_t count

References count, current, and damp_asymmetric().

+ Here is the call graph for this function: