LitDev.LDMath.Rotate C# (CSharp) Method

Rotate() public static method

Rotate point 2 clockwise about point 1.
public static Rotate ( Primitive x1, Primitive y1, Primitive x2, Primitive y2, Primitive angle ) : Primitive
x1 Primitive /// The X coordinate of point 1. ///
y1 Primitive /// The Y coordinate of point 1. ///
x2 Primitive /// The X coordinate of point 2. ///
y2 Primitive /// The Y coordinate of point 2. ///
angle Primitive /// The angle to rotate point 2 around point 1 in degrees. ///
return Primitive
        public static Primitive Rotate(Primitive x1, Primitive y1, Primitive x2, Primitive y2, Primitive angle)
        {
            Primitive radial = Convert2Radial(x1, y1, x2, y2);
            return Convert2Cartesian(x1, y1, radial[1], radial[2] + angle);
        }