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

Function clamp01

src/fl/audio/audio_processor.cpp.hpp:457–461  ·  view source on GitHub ↗

Helper: clamp float to 0..1

Source from the content-addressed store, hash-verified

455
456// Helper: clamp float to 0..1
457static float clamp01(float v) {
458 if (v < 0.0f) return 0.0f;
459 if (v > 1.0f) return 1.0f;
460 return v;
461}
462
463// Helper: clamp float to -1..1
464static float clampNeg1To1(float v) {

Callers 15

getVocalConfidenceMethod · 0.85
getBeatConfidenceMethod · 0.85
getEnergyMethod · 0.85
getPeakLevelMethod · 0.85
getBassLevelMethod · 0.85
getMidLevelMethod · 0.85
getTrebleLevelMethod · 0.85
getTransientStrengthMethod · 0.85
getPitchConfidenceMethod · 0.85
getTempoConfidenceMethod · 0.85
getBuildupIntensityMethod · 0.85
getBuildupProgressMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected