FastLED 3.10.9
Loading...
Searching...
No Matches

◆ fastMag()

static u16 fl::audio::fft::Context::fastMag ( i32 re,
i32 im )
inlinestaticprivate

Definition at line 345 of file fft_impl.cpp.hpp.

345 {
346 u32 a = (re >= 0) ? static_cast<u32>(re) : static_cast<u32>(-re);
347 u32 b = (im >= 0) ? static_cast<u32>(im) : static_cast<u32>(-im);
348 u32 mx = (a > b) ? a : b;
349 u32 mn = (a <= b) ? a : b;
350 static constexpr u16x16 kMinWeight(0.40625f);
351 return static_cast<u16>(mx + (kMinWeight * static_cast<i32>(mn)).to_int());
352 }

References fl::FL_NO_EXCEPT.

Referenced by batchMag(), runNaive(), and runOctaveWise().

+ Here is the caller graph for this function: