Math-Trig Diag by Y and Ang

From Vectorlab
Jump to: navigation, search

Given a HEIGHT (y) and an ANGLE (ang), returns the DIAGONAL. By Orso B. Schmid

{ Orso ************************************************ }
{ Given a HEIGHT (y) and an ANGLE, returns the DIAGONAL }
FUNCTION M_Trig_DbyYandAng(y, ang: REAL): REAL;
		M_Trig_DbyYandAng := 0;
		IF sin(Deg2Rad(ang)) <> 0 THEN
			M_Trig_DbyYandAng := y / sin(Deg2Rad(ang));