Search Results for

    Show / Hide Table of Contents

    Class VectorMath

    Functions for performing vector mathematics.

    Inheritance
    object
    VectorMath
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Mathematics
    Assembly: NetTopologySuite.dll
    Syntax
    public static class VectorMath

    Methods

    | Edit this page View Source

    CrossProduct(Coordinate, Coordinate)

    Computes the cross product of v1 and v2

    Declaration
    public static Coordinate CrossProduct(Coordinate v1, Coordinate v2)
    Parameters
    Type Name Description
    Coordinate v1

    A vector

    Coordinate v2

    A vector

    Returns
    Type Description
    Coordinate

    The cross product of v1 and v2

    | Edit this page View Source

    Det(double, double, double, double)

    Computes the determinant of a 2x2 matrix

    Declaration
    public static double Det(double a1, double a2, double b1, double b2)
    Parameters
    Type Name Description
    double a1

    The m[0,0] value

    double a2

    The m[0,1] value

    double b1

    The m[1,0] value

    double b2

    The m[1,1] value

    Returns
    Type Description
    double

    The determinant

    | Edit this page View Source

    DotProduct(Coordinate, Coordinate)

    Computes the dot product of v1 and v2

    Declaration
    public static double DotProduct(Coordinate v1, Coordinate v2)
    Parameters
    Type Name Description
    Coordinate v1

    A vector

    Coordinate v2

    A vector

    Returns
    Type Description
    double

    The dot product of v1 and v2

    | Edit this page View Source

    NormalToTriangle(Coordinate, Coordinate, Coordinate)

    Computes the normal vector to the triangle p0-p1-p2. In order to compute the normal each triangle coordinate must have a Z value. If this is not the case, the returned Coordinate will have NaN values. The returned vector has unit length.

    Declaration
    public static Coordinate NormalToTriangle(Coordinate p0, Coordinate p1, Coordinate p2)
    Parameters
    Type Name Description
    Coordinate p0

    A point

    Coordinate p1

    A point

    Coordinate p2

    A point

    Returns
    Type Description
    Coordinate

    The normal vector to the triangle p0-p1-p2

    | Edit this page View Source

    Normalize(Coordinate)

    Normalizes the vector v

    Declaration
    public static void Normalize(Coordinate v)
    Parameters
    Type Name Description
    Coordinate v

    The normalized v

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX