diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-07-21 19:27:40 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-07-21 19:27:40 +0400 |
commit | 62a73381a7ec63e75960d3c9545c638c85d3b06a (patch) | |
tree | 25d16dfc4c245bacb98c3737c3817d1a52ce8d93 /source/gameengine/VideoTexture/ImageRender.cpp | |
parent | 1bb7cfded603028db0d52b3c0917900e83b858e6 (diff) |
use fabsf when using floats.
Diffstat (limited to 'source/gameengine/VideoTexture/ImageRender.cpp')
-rw-r--r-- | source/gameengine/VideoTexture/ImageRender.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/gameengine/VideoTexture/ImageRender.cpp b/source/gameengine/VideoTexture/ImageRender.cpp index 97e52e3af3d..2cc2c6efa1e 100644 --- a/source/gameengine/VideoTexture/ImageRender.cpp +++ b/source/gameengine/VideoTexture/ImageRender.cpp @@ -637,8 +637,8 @@ ImageRender::ImageRender (KX_Scene * scene, KX_GameObject * observer, KX_GameObj // otherwise the Y axis is the up direction. // If the mirror is not perfectly vertical(horizontal), the Z(Y) axis projection on the mirror // plan by the normal will be the up direction. - if (fabs(mirrorNormal[2]) > fabs(mirrorNormal[1]) && - fabs(mirrorNormal[2]) > fabs(mirrorNormal[0])) + if (fabsf(mirrorNormal[2]) > fabsf(mirrorNormal[1]) && + fabsf(mirrorNormal[2]) > fabsf(mirrorNormal[0])) { // the mirror is more horizontal than vertical copy_v3_v3(axis, yaxis); @@ -649,7 +649,7 @@ ImageRender::ImageRender (KX_Scene * scene, KX_GameObject * observer, KX_GameObj copy_v3_v3(axis, zaxis); } dist = dot_v3v3(mirrorNormal, axis); - if (fabs(dist) < FLT_EPSILON) + if (fabsf(dist) < FLT_EPSILON) { // the mirror is already fully aligned with up axis copy_v3_v3(mirrorUp, axis); |