diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/utils/mathutils.cpp | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2007-06-16 Guillaume Melquiond <guillaume.melquiong@gmail.com> + + * src/utils/mathutils.cpp: Fixed miscompilation of rsqrt due to type + aliasing and sped up sqrt. + 2007-04-11 Philipp Sehmisch <tmw@crushnet.org> * src/game-server/being.cpp: Using effective attributes instead of base diff --git a/src/utils/mathutils.cpp b/src/utils/mathutils.cpp index 1c5e608c..6ffaffc2 100644 --- a/src/utils/mathutils.cpp +++ b/src/utils/mathutils.cpp @@ -45,7 +45,7 @@ float tanList[MATH_UTILS_MAX_ANGLE]; */ float utils::math::fastInvSqrt(float x) { - typedef char float_is_32_bits[(sizeof(float) == 4) - 1]; + typedef char float_must_be_32_bits[(sizeof(float) == 4) * 2 - 1]; float xhalf = 0.5f * x; uint32_t i; memcpy(&i, &x, 4); |