summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschodet2004-06-27 14:25:25 +0000
committerschodet2004-06-27 14:25:25 +0000
commiteecd60dc776ff46454d955dafa9b47d0f921555d (patch)
treee8555402ae6e627795948b25b8f2b66a40863186
parent8cc778274c727d3aba323b8e26877aa068ea0f88 (diff)
Normalisation d'angle entre [pi et pi).
-rw-r--r--2004/i/nono/src/utils/mathutil.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/2004/i/nono/src/utils/mathutil.h b/2004/i/nono/src/utils/mathutil.h
index 8d3eee8..c2f1688 100644
--- a/2004/i/nono/src/utils/mathutil.h
+++ b/2004/i/nono/src/utils/mathutil.h
@@ -34,11 +34,11 @@ angleNorm (double a);
void
toPolair (double x, double y, double &r, double &a);
-/// Normalise l'angle entre -pi et +pi.
+/// Normalise l'angle en [-pi..+pi).
inline double
angleNorm (double a)
{
- while (a > M_PI)
+ while (a >= M_PI)
a -= 2.0 * M_PI;
while (a < -M_PI)
a += 2.0 * M_PI;