static constexpr float fastInvSqrt(float x) noexcept
{
static_assert(std::numeric_limits<float>::is_iec559);
// TMay, June 2026:
// std::bit_cast not implemented in daisy tool tree (gcc 10.3.1)
// To make it work, I replaced these two lines:
//
// float const y = std::bit_cast<float>(
// 0x5F1FFFF9 - (std::bit_cast<std::uint32_t>(x) >> 1));
// with these three lines:
uint32_t i = * ( uint32_t * ) &x; // What sort of utter madness is THIS?!??...
i = 0x5F1FFFF9 - (i >> 1); // gotta love magic numbers
float const y = * (float * ) &i; // Same colossal f*ckery as two lines above, but in reverse.
return y * (0.703952253f * (2.38924456f - (x * y * y)));
}