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

◆ atan() [2/2]

static FASTLED_FORCE_INLINE s4x12 fl::s4x12::atan ( s4x12 x)
inlinestatic

Definition at line 163 of file s4x12.h.

163 {
164 constexpr s4x12 one(1.0f);
165 constexpr s4x12 pi_over_2(1.5707963f);
166 bool neg = x.mValue < 0;
167 s4x12 ax = abs(x);
169 if (ax <= one) {
170 result = atan_unit(ax);
171 } else {
172 result = pi_over_2 - atan_unit(one / ax);
173 }
174 return neg ? -result : result;
175 }
static FASTLED_FORCE_INLINE s4x12 atan_unit(s4x12 t) FL_NOEXCEPT
Definition s4x12.h:402
constexpr s4x12() FL_NOEXCEPT=default
constexpr FASTLED_FORCE_INLINE s4x12 abs() const FL_NOEXCEPT
Definition s4x12.h:246
expected< T, E > result
Alias for expected (Rust-style naming)
Definition result.h:31

References s4x12(), abs(), atan_unit(), FASTLED_FORCE_INLINE, FL_NOEXCEPT, and fl::x.

+ Here is the call graph for this function: