diff options
author | Fire_Head <Fire-Head@users.noreply.github.com> | 2019-07-11 02:48:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-11 02:48:36 +0200 |
commit | aa449b6fe162d8960351c5fe164a9120b8572652 (patch) | |
tree | fa82496d356ac2b77ffa1ab00684b0150907f009 /src/core/General.h | |
parent | fixfixfix (diff) | |
parent | Merge pull request #129 from erorcun/erorcun (diff) | |
download | re3-aa449b6fe162d8960351c5fe164a9120b8572652.tar re3-aa449b6fe162d8960351c5fe164a9120b8572652.tar.gz re3-aa449b6fe162d8960351c5fe164a9120b8572652.tar.bz2 re3-aa449b6fe162d8960351c5fe164a9120b8572652.tar.lz re3-aa449b6fe162d8960351c5fe164a9120b8572652.tar.xz re3-aa449b6fe162d8960351c5fe164a9120b8572652.tar.zst re3-aa449b6fe162d8960351c5fe164a9120b8572652.zip |
Diffstat (limited to 'src/core/General.h')
-rw-r--r-- | src/core/General.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/core/General.h b/src/core/General.h index cae1caa0..64613478 100644 --- a/src/core/General.h +++ b/src/core/General.h @@ -6,32 +6,32 @@ public: static float GetATanOfXY(float x, float y){ if(x == 0.0f && y == 0.0f) return 0.0f; - float xabs = fabs(x); - float yabs = fabs(y); + float xabs = Abs(x); + float yabs = Abs(y); if(xabs < yabs){ if(y > 0.0f){ if(x > 0.0f) - return 0.5f*PI - atan2(x / y, 1.0f); + return 0.5f*PI - Atan2(x / y, 1.0f); else - return 0.5f*PI + atan2(-x / y, 1.0f); + return 0.5f*PI + Atan2(-x / y, 1.0f); }else{ if(x > 0.0f) - return 1.5f*PI + atan2(x / -y, 1.0f); + return 1.5f*PI + Atan2(x / -y, 1.0f); else - return 1.5f*PI - atan2(-x / -y, 1.0f); + return 1.5f*PI - Atan2(-x / -y, 1.0f); } }else{ if(y > 0.0f){ if(x > 0.0f) - return atan2(y / x, 1.0f); + return Atan2(y / x, 1.0f); else - return PI - atan2(y / -x, 1.0f); + return PI - Atan2(y / -x, 1.0f); }else{ if(x > 0.0f) - return 2.0f*PI - atan2(-y / x, 1.0f); + return 2.0f*PI - Atan2(-y / x, 1.0f); else - return PI + atan2(-y / -x, 1.0f); + return PI + Atan2(-y / -x, 1.0f); } } } @@ -68,14 +68,14 @@ public: if (x > 0.0f) { if (y > 0.0f) - return PI - atan2(x / y, 1.0f); + return PI - Atan2(x / y, 1.0f); else - return -atan2(x / y, 1.0f); + return -Atan2(x / y, 1.0f); } else { if (y > 0.0f) - return -(PI + atan2(x / y, 1.0f)); + return -(PI + Atan2(x / y, 1.0f)); else - return -atan2(x / y, 1.0f); + return -Atan2(x / y, 1.0f); } } |