Math-Trig Ang by X and Y

From Vectorlab
Jump to: navigation, search


Given a WIDTH (x) and a HEIGHT (y), returns the ANGLE. By Orso B. Schmid


{ Orso ***************************** }
{ given a WIDTH (x) and a HEIGHT (y), returns the ANGLE }
FUNCTION M_Trig_AngByXandY(x, y: REAL): REAL;
	BEGIN
		M_Trig_AngByXandY := 0;
		IF x <> 0 THEN
			M_Trig_AngByXandY := Rad2Deg(ArcTan(y/x));
	END;