Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/functions.cc')
-rw-r--r--src/math/functions.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/math/functions.cc b/src/math/functions.cc
index 53ce41e..e048659 100644
--- a/src/math/functions.cc
+++ b/src/math/functions.cc
@@ -1,10 +1,9 @@
/*
- common/functions.cc
+ math/functions.cc
This file is part of the Osirion project and is distributed under
the terms of the GNU General Public License version 2
*/
-// project headers
#include "math/functions.h"
namespace math
@@ -43,9 +42,9 @@ unsigned randomi(const unsigned int max)
float degrees180f(float angle)
{
float r = angle;
- while (r <= -180.0f)
+ while (r < -180.0f)
r += 360.0f;
- while (r >= 180.0f)
+ while (r > 180.0f)
r -= 360.0f;
return r;
}
@@ -55,7 +54,7 @@ float degrees360f(float angle)
float r = angle;
while (r < 0.0f)
r += 360.0f;
- while (r >= 360.0f)
+ while (r > 360.0f)
r -= 360.0f;
return r;
}