summaryrefslogtreecommitdiffstats
path: root/src/Defines.h
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-03-09 19:21:42 +0100
committerTycho <work.tycho+git@gmail.com>2014-03-09 19:21:42 +0100
commit9825dbfd34c65580d795065d1a82e7697b9c5cbd (patch)
treea112f3b17bdf16dce31a62f904e201ac58b96720 /src/Defines.h
parentMerge branch 'master' into Werror (diff)
downloadcuberite-9825dbfd34c65580d795065d1a82e7697b9c5cbd.tar
cuberite-9825dbfd34c65580d795065d1a82e7697b9c5cbd.tar.gz
cuberite-9825dbfd34c65580d795065d1a82e7697b9c5cbd.tar.bz2
cuberite-9825dbfd34c65580d795065d1a82e7697b9c5cbd.tar.lz
cuberite-9825dbfd34c65580d795065d1a82e7697b9c5cbd.tar.xz
cuberite-9825dbfd34c65580d795065d1a82e7697b9c5cbd.tar.zst
cuberite-9825dbfd34c65580d795065d1a82e7697b9c5cbd.zip
Diffstat (limited to '')
-rw-r--r--src/Defines.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Defines.h b/src/Defines.h
index 6ab2274a4..fd240c91a 100644
--- a/src/Defines.h
+++ b/src/Defines.h
@@ -469,7 +469,7 @@ inline void EulerToVector(double a_Pan, double a_Pitch, double & a_X, double & a
inline void VectorToEuler(double a_X, double a_Y, double a_Z, double & a_Pan, double & a_Pitch)
{
- if (a_X != 0)
+ if (fabs(a_X) < std::numeric_limits::epsilon() )
{
a_Pan = atan2(a_Z, a_X) * 180 / PI - 90;
}