Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/math
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-05-12 13:08:45 +0000
committerStijn Buys <ingar@osirion.org>2008-05-12 13:08:45 +0000
commite4f2faa8d5895ba30207c09c7886afb21a697d5f (patch)
tree90751a70d480781c25274e70c4804f37acf72ee2 /src/math
parent24c695e83947d3457dbd1f5d696fa09b4ef953c0 (diff)
aux::plural, aux::article
Diffstat (limited to 'src/math')
-rw-r--r--src/math/functions.cc9
-rw-r--r--src/math/functions.h1
2 files changed, 4 insertions, 6 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;
}
diff --git a/src/math/functions.h b/src/math/functions.h
index d84fe05..3d5d056 100644
--- a/src/math/functions.h
+++ b/src/math/functions.h
@@ -7,7 +7,6 @@
#ifndef __INCLUDED_MATH_FUNCTIONS_H__
#define __INCLUDED_MATH_FUNCTIONS_H__
-// C++ headers
#include <math.h>
#include <cstdlib>