Math-Trig Cotangent by Diag and Ang

From Vectorlab
Jump to: navigation, search

Given a DIAGONAL (d) and an ANGLE (ang), returns the length of the COTANGENT. This needs the routine M_Trig_YbyXandAng to be loaded first. By Orso B. Schmid

{ Orso ************************************************ }
{ Trig: given a DIAGONAL (d) and an ANGLE, returns the length of the COTANGENT }
{ this doesn't take into account when the tan is undefined: d > 0 and ang 90 and similar cases }
FUNCTION M_Trig_CoTanByDandAng(d, ang: REAL): REAL;
		{ d is the same as the x of a triangle where tanA is y }
		M_Trig_CoTanByDandAng := M_Trig_YbyXandAng(d, 90-ang);