summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/utils/mathutils.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/utils/mathutils.cpp b/src/utils/mathutils.cpp
index 6f7bc22..a11538e 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);