Math-Check Angle 360

From Vectorlab
Jump to: navigation, search


Checks validity of an angle, returns a valid angle. By Orso B. Schmid


{ Orso ************************************************ }
{ check validity of angle }
FUNCTION M_CheckAng360(ang: REAL): REAL;
	BEGIN
		IF ang > 360 THEN
			ang := ang - 360
		ELSE IF ang < -360 THEN
			ang := ang + 360;
			
		M_CheckAng360 := ang;
	END;