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

◆ calculateSteps()

int fl::XYPath::calculateSteps ( float from,
float to )
private

Definition at line 291 of file xypath.cpp.hpp.

291 {
292 float diff = fl::clamp(fl::abs(to - from), 0.0f, 1.0f);
293 return fl::max(1, 200 * diff);
294}
constexpr common_type_t< T, U > max(T a, U b) FL_NOEXCEPT
Definition math.h:75
constexpr enable_if< is_fixed_point< T >::value, T >::type abs(T x) FL_NOEXCEPT
constexpr enable_if< is_fixed_point< T >::value, T >::type clamp(T x, T lo, T hi) FL_NOEXCEPT

References fl::abs(), fl::clamp(), and fl::max().

Referenced by drawColor(), and drawGradient().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: