MCPcopy Create free account
hub / github.com/FastLED/FastLED / clamp

Function clamp

src/fl/math/fixed_point.h:541–542  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

539// Clamp to range: fl::clamp(FP(5.0f), FP(0.0f), FP(3.0f)) → 3.0
540template <typename T>
541inline constexpr typename enable_if<is_fixed_point<T>::value, T>::type
542clamp(T x, T lo, T hi) FL_NOEXCEPT { return T::clamp(x, lo, hi); }
543
544// Step: fl::step(FP(0.5f), FP(0.7f)) → 1.0
545template <typename T>

Callers 15

calculateStepsMethod · 0.85
native_single_identityFunction · 0.85
solve_wx_overdriveFunction · 0.85
build_lutFunction · 0.85
lookup_lutFunction · 0.85
solve_rgbcctFunction · 0.85
coordToU8Function · 0.85
coordToU8<int>Function · 0.85
s16x16>Method · 0.85
rgbcct_eta_for_cctFunction · 0.85

Calls

no outgoing calls

Tested by 7

makeJitteredVowelFunction · 0.68
makeGuitarStringDecayFunction · 0.68
makeFullBandMixFunction · 0.68
makeSawtoothWaveFunction · 0.68
makeTremoloToneFunction · 0.68
makeFilteredNoiseFunction · 0.68
makePitchedTomFunction · 0.68