Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-07-21 19:27:40 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-21 19:27:40 +0400
commit62a73381a7ec63e75960d3c9545c638c85d3b06a (patch)
tree25d16dfc4c245bacb98c3737c3817d1a52ce8d93 /source/gameengine/Ketsji/KX_GameObject.cpp
parent1bb7cfded603028db0d52b3c0917900e83b858e6 (diff)
use fabsf when using floats.
Diffstat (limited to 'source/gameengine/Ketsji/KX_GameObject.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index c5145ef2171..b005684a6db 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -1162,8 +1162,8 @@ void KX_GameObject::NodeSetWorldScale(const MT_Vector3& scale)
{
// Make sure the objects have some scale
MT_Vector3 p_scale = parent->GetWorldScaling();
- if (fabs(p_scale[0]) < FLT_EPSILON ||
- fabs(p_scale[1]) < FLT_EPSILON ||
+ if (fabs(p_scale[0]) < FLT_EPSILON ||
+ fabs(p_scale[1]) < FLT_EPSILON ||
fabs(p_scale[2]) < FLT_EPSILON)
{
return;
@@ -1190,8 +1190,8 @@ void KX_GameObject::NodeSetWorldPosition(const MT_Point3& trans)
{
// Make sure the objects have some scale
MT_Vector3 scale = parent->GetWorldScaling();
- if (fabs(scale[0]) < FLT_EPSILON ||
- fabs(scale[1]) < FLT_EPSILON ||
+ if (fabs(scale[0]) < FLT_EPSILON ||
+ fabs(scale[1]) < FLT_EPSILON ||
fabs(scale[2]) < FLT_EPSILON)
{
return;
@@ -1203,7 +1203,7 @@ void KX_GameObject::NodeSetWorldPosition(const MT_Point3& trans)
MT_Vector3 newpos = invori*(trans-parent->GetWorldPosition())*scale;
NodeSetLocalPosition(MT_Point3(newpos[0],newpos[1],newpos[2]));
}
- else
+ else
{
NodeSetLocalPosition(trans);
}