diff options
author | Alexander Harkness <me@bearbin.net> | 2014-09-22 14:33:41 +0200 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2014-09-22 14:33:41 +0200 |
commit | b9b45e82876caf51cf486b72c811aa49ef67b1ed (patch) | |
tree | e39037971290a1b9fa6343c0c8f846541096d435 /src/Entities/Entity.cpp | |
parent | QtBiomeVisualiser: Added the base for INI editting. (diff) | |
parent | Made it compile with clang (diff) | |
download | cuberite-b9b45e82876caf51cf486b72c811aa49ef67b1ed.tar cuberite-b9b45e82876caf51cf486b72c811aa49ef67b1ed.tar.gz cuberite-b9b45e82876caf51cf486b72c811aa49ef67b1ed.tar.bz2 cuberite-b9b45e82876caf51cf486b72c811aa49ef67b1ed.tar.lz cuberite-b9b45e82876caf51cf486b72c811aa49ef67b1ed.tar.xz cuberite-b9b45e82876caf51cf486b72c811aa49ef67b1ed.tar.zst cuberite-b9b45e82876caf51cf486b72c811aa49ef67b1ed.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/Entity.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp index 42b207c48..996f2fff3 100644 --- a/src/Entities/Entity.cpp +++ b/src/Entities/Entity.cpp @@ -260,7 +260,7 @@ void cEntity::TakeDamage(eDamageType a_DamageType, cEntity * a_Attacker, int a_R void cEntity::SetYawFromSpeed(void) { const double EPS = 0.0000001; - if ((abs(m_Speed.x) < EPS) && (abs(m_Speed.z) < EPS)) + if ((std::abs(m_Speed.x) < EPS) && (std::abs(m_Speed.z) < EPS)) { // atan2() may overflow or is undefined, pick any number SetYaw(0); @@ -277,7 +277,7 @@ void cEntity::SetPitchFromSpeed(void) { const double EPS = 0.0000001; double xz = sqrt(m_Speed.x * m_Speed.x + m_Speed.z * m_Speed.z); // Speed XZ-plane component - if ((abs(xz) < EPS) && (abs(m_Speed.y) < EPS)) + if ((std::abs(xz) < EPS) && (std::abs(m_Speed.y) < EPS)) { // atan2() may overflow or is undefined, pick any number SetPitch(0); |