Neco/LandView/LandViewUtils.cs
///<summary>Return the angle ABC.
/// Return a value between PI and -PI.
/// Note that the value is the opposite of what you might
/// expect because Y coordinates increase downward.</summary>
Return the angle ABC.
Return a value between PI and -PI.
Note that the value is the opposite of what you might
expect because Y coordinates increase downward.
Return the angle ABC . Return a value between PI and - PI . Note that the value is the opposite of what you might expect because Y coordinates increase downward .
public static float GetAngle(float Ax, float Ay,
            float Bx, float By, float Cx, float Cy) {
            float dot_product = DotProduct(Ax, Ay, Bx, By, Cx, Cy);
            float cross_product = CrossProductLength(Ax, Ay, Bx, By, Cx, Cy);
            return (float)Math.Atan2(cross_product, dot_product);
        }
public static float GetAngle ( float Ax , float Ay , float Bx , float By , float Cx , float Cy ) { float dot_product = DotProduct ( Ax , Ay , Bx , By , Cx , Cy ) ; float cross_product = CrossProductLength ( Ax , Ay , Bx , By , Cx , Cy ) ; return ( float ) Math . Atan2 ( cross_product , dot_product ) ; }
Return the angle ABC.
Return the angle ABC .
// Get the dot product. // Get the cross product. // Calculate the angle.
Ax
float
Ay
float
Bx
float
By
float
Cx
float
Cy
float