Math-Trig Diag by X and Ang

From Vectorlab
Jump to: navigation, search

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

{ Orso ************************************************ }
{ Pitagora: given a WIDTH (x) and an ANGLE, returns the DIAGONAL }
FUNCTION M_Trig_DbyXandAng(x, ang: REAL): REAL;
		M_Trig_DbyXandAng := 0;
		IF cos(Deg2Rad(ang)) <> 0 THEN
			M_Trig_DbyXandAng := x / cos(Deg2Rad(ang));