From e4f2faa8d5895ba30207c09c7886afb21a697d5f Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 12 May 2008 13:08:45 +0000 Subject: aux::plural, aux::article --- src/math/functions.cc | 9 ++++----- src/math/functions.h | 1 - 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'src/math') 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 #include -- cgit v1.2.3