Fixed angle normalization (caused problems with 0 and 360 degrees in DoomToReal and RealToDoom angle conversion)

This commit is contained in:
codeimp 2009-02-21 23:16:38 +00:00
parent 1ecb3ad425
commit 7580955d3e

View file

@ -68,7 +68,7 @@ namespace CodeImp.DoomBuilder.Geometry
public static float Normalized(float a)
{
while(a < 0f) a += PI2;
while(a > PI2) a -= PI2;
while(a >= PI2) a -= PI2;
return a;
}