示例#1
0
        public static double AngleVector1(
            double aX, double aY,
            double bX, double bY,
            double cX, double cY)
        {
            // Get the dot product.
            var dotProduct = DotProduct3Vector2DTests.DotProductVector2D(aX, aY, bX, bY, cX, cY);

            // Get the cross product.
            var crossProduct = CrossProduct3Vector2DTests.CrossProductVector2D(aX, aY, bX, bY, cX, cY);

            // Calculate the angle.
            return(Atan2(crossProduct, dotProduct));
        }
示例#2
0
 public static double AngleVector0(
     double x1, double y1,
     double x2, double y2,
     double x3, double y3)
 {
     return(Atan2(CrossProduct3Vector2DTests.CrossProductVector2D(x1, y1, x2, y2, x3, y3), DotProduct3Vector2DTests.DotProductVector2D(x1, y1, x2, y2, x3, y3)));
 }