Exemple #1
0
        /// <summary>
        /// Creates a right triangle from one side and its adjacent angle in degrees.
        /// This side and angle are treated as side/angle A.
        /// </summary>
        /// <param name="lengthA">Length of side A.</param>
        /// <param name="angleA">Angle adjacent to side A in degrees.</param>
        public static RightTriangleAbstract FromSideAAngleA(decimal lengthA, decimal angleA)
        {
            var t = new RightTriangleAbstract
            {
                LengthA    = lengthA,
                AngleA     = angleA,
                LengthB    = RightTriangle.GetSideFromOppAngleOppSide(angleA, lengthA),
                AngleB     = RightTriangle.GetAngleFromOtherAngle(angleA),
                Hypotenuse = RightTriangle.GetHypFromSideAdjAngle(lengthA, angleA)
            };

            return(t);
        }