diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/utils/mathutils.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/utils/mathutils.cpp b/src/utils/mathutils.cpp index 6f7bc223..a11538e5 100644 --- a/src/utils/mathutils.cpp +++ b/src/utils/mathutils.cpp @@ -50,7 +50,8 @@ namespace math { */ float fastInvSqrt(float x) { - typedef char float_must_be_32_bits[(sizeof(float) == 4) * 2 - 1]; + static_assert(sizeof(float) == 4, "float must be 32 bits"); + float xhalf = 0.5f * x; uint32_t i; memcpy(&i, &x, 4); |