diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2013-04-27 23:30:18 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2013-04-27 23:30:18 +0200 |
commit | 5bfc376d1cee0f941657a771b87a3ee030d31c56 (patch) | |
tree | de739c3845aa3f5bb9cb4bb79236551d5f3fc8b5 /src/utils/mathutils.cpp | |
parent | c53bc90dbaa876a86f762a3d864b1f920e2b8071 (diff) | |
parent | d4f3105d9a879f27baad6e43b8b3cb6fe2f0ef50 (diff) | |
download | manaserv-5bfc376d1cee0f941657a771b87a3ee030d31c56.tar.gz manaserv-5bfc376d1cee0f941657a771b87a3ee030d31c56.tar.bz2 manaserv-5bfc376d1cee0f941657a771b87a3ee030d31c56.tar.xz manaserv-5bfc376d1cee0f941657a771b87a3ee030d31c56.zip |
Merge branch 'master' into lpc2012
Diffstat (limited to 'src/utils/mathutils.cpp')
-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); |