Integer-specific utility functions optimized for performance.
#include <utils.hpp>
Static Public Member Functions | |
static constexpr uint32_t | FastSqrt (uint32_t src) |
Fast integer square root approximation with ~6% error. | |
|
inlinestaticconstexpr |
Fast integer square root approximation with ~6% error.
Binary search approximation supporting full uint32_t range. Maximum 15 iterations after initial right shift by 2. Ideal for games where integer precision is sufficient and performance matters more than perfect accuracy.
src | The 32-bit integer value. |