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

◆ clamp()

template<typename D >
Tendency< D, float > MayaFlux::Kinesis::clamp ( const Tendency< D, float > &  t,
float  lo,
float  hi 
)

Clamp scalar output to [lo, hi].

Template Parameters
DDomain type
Parameters
tSource tendency
loLower bound
hiUpper bound
Returns
Clamped tendency

Definition at line 127 of file Tendency.hpp.

128{
129 return { .fn = [t, lo, hi](const D& d) -> float {
130 return std::clamp(t(d), lo, hi);
131 } };
132}