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

◆ cos_poly_quarterturn_()

template<typename F>
F fl::detail::cos_poly_quarterturn_ ( F x)
inline

Definition at line 177 of file math.cpp.hpp.

177 {
178 // cos(x) ≈ 1 - x²/2 + x⁴/24 - x⁶/720
179 const F x2 = x * x;
180 return F(1) - x2 * (F(0.5) - x2 * (F(1.0 / 24.0) - x2 * F(1.0 / 720.0)));
181}

References FL_NOEXCEPT, and fl::x.