From b1343ca2817f1f8eb15b371b8f608669a590f451 Mon Sep 17 00:00:00 2001 From: Roberto Fernandez Bautista Date: Tue, 8 Sep 2020 19:46:20 +0100 Subject: [PATCH] Fix NormalizeAngleNeg to be (-360, 0] --- libs/kimath/include/trigo.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/kimath/include/trigo.h b/libs/kimath/include/trigo.h index f01a302cb7..5fc37c5050 100644 --- a/libs/kimath/include/trigo.h +++ b/libs/kimath/include/trigo.h @@ -254,9 +254,9 @@ template inline T NormalizeAngle360Min( T Angle ) template inline T NormalizeAngleNeg( T Angle ) { - while( Angle < -3600 ) + while( Angle <= -3600 ) Angle += 3600; - while( Angle >= 0 ) + while( Angle > 0 ) Angle -= 3600; return Angle; }