Math3D.SignedDotProduct C# (CSharp) Method

SignedDotProduct() public static method

public static SignedDotProduct ( Vector3 vectorA, Vector3 vectorB, Vector3 normal ) : float
vectorA Vector3
vectorB Vector3
normal Vector3
return float
    public static float SignedDotProduct(Vector3 vectorA, Vector3 vectorB, Vector3 normal)
    {
        Vector3 perpVector;
        float dot;

        //Use the geometry object normal and one of the input vectors to calculate the perpendicular vector
        perpVector = Vector3.Cross(normal, vectorA);

        //Now calculate the dot product between the perpendicular vector (perpVector) and the other input vector
        dot = Vector3.Dot(perpVector, vectorB);

        return dot;
    }