Neco/LandView/LandViewUtils.cs
///<summary>Return the cross product AB x BC.
/// The cross product is a vector perpendicular to AB
/// and BC having length |AB| * |BC| * Sin(theta) and
/// with direction given by the right-hand rule.
/// For two vectors in the X-Y plane, the result is a
/// vector with X and Y components 0 so the Z component
/// gives the vector's length and direction.</summary>
Return the cross product AB x BC.
The cross product is a vector perpendicular to AB
and BC having length |AB| * |BC| * Sin(theta) and
with direction given by the right-hand rule.
For two vectors in the X-Y plane, the result is a
vector with X and Y components 0 so the Z component
gives the vector's length and direction.
Return the cross product AB x BC . The cross product is a vector perpendicular to AB and BC having length |AB| * |BC| * Sin ( theta ) and with direction given by the right - hand rule . For two vectors in the X - Y plane the result is a vector with X and Y components 0 so the Z component gives the vector ' s length and direction .
public static float CrossProductLength(float Ax, float Ay,
            float Bx, float By, float Cx, float Cy) {
            float BAx = Ax - Bx;
            float BAy = Ay - By;
            float BCx = Cx - Bx;
            float BCy = Cy - By;
            return (BAx * BCy - BAy * BCx);
        }
public static float CrossProductLength ( float Ax , float Ay , float Bx , float By , float Cx , float Cy ) { float BAx = Ax - Bx ; float BAy = Ay - By ; float BCx = Cx - Bx ; float BCy = Cy - By ; return ( BAx * BCy - BAy * BCx ) ; }
Return the cross product AB x BC.
Return the cross product AB x BC .
// Get the vectors' coordinates. // Calculate the Z coordinate of the cross product.
Ax
float
Ay
float
Bx
float
By
float
Cx
float
Cy
float