コード例 #1
0
 /// <summary>
 /// Gets angle in degrees from the opposite side and the hypotenuse.
 /// </summary>
 /// <param name="oppositeSide">Length of the known side opposite the angle.</param>
 /// <param name="hypotenuse">Length of the hypotenuse.</param>
 public static decimal GetAngleFromOppSideHyp(decimal oppositeSide, decimal hypotenuse)
 {
     // sin(a) = oppositeSide / hypotenuse
     // a = asin(oppositeSide / hypotenuse)
     return(DecimalEx.ToDeg(DecimalEx.ASin(oppositeSide / hypotenuse)));
 }