FastLED 3.10.8
Loading...
Searching...
No Matches

◆ fastMag()

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

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

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

References fl::FL_NO_EXCEPT.

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

+ Here is the caller graph for this function: