Math-Check Angle 180

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_CheckAng180(ang: REAL): REAL;
	BEGIN
		IF ang > 180 THEN
			ang := ang - 180
		ELSE IF ang < -180 THEN
			ang := ang + 180;
			
		M_CheckAng180 := ang;
	END;