FastLED 3.9.15
Loading...
Searching...
No Matches

◆ clamp()

template<typename T>
FASTLED_FORCE_INLINE T fl::clamp ( T value,
T min,
T max )

Definition at line 10 of file clamp.h.

10 {
11 if (value < min) {
12 return min;
13 }
14 if (value > max) {
15 return max;
16 }
17 return value;
18}

References FASTLED_FORCE_INLINE.

Referenced by fl::XYPath::calculateSteps(), fl::wave_detail::float_to_fixed(), fl::MatrixSlice< T >::getLocalCoord(), map_range_clamped(), fl::XYMap::mapToIndex(), fl::WaveSimulation1D::setf(), fl::WaveSimulation2D::setf(), and fl::HashMap< Key, T, Hash, KeyEqual >::setLoadFactor().

+ Here is the caller graph for this function: