Version: 15.0

    Show / Hide Table of Contents

    Struct Vector2D

    Implements
    System.IEquatable<Vector2D>
    Inherited Members
    System.ValueType.ToString()
    Namespace: SMT.MastaAPI.MathUtility
    Assembly: SMT.MastaAPI.15.0.dll
    Syntax
    public struct Vector2D : IEquatable<Vector2D>

    Constructors

    Vector2D(Double, Double)

    Declaration
    public Vector2D(double x, double y)
    Parameters
    Type Name Description
    System.Double x
    System.Double y

    Fields

    X

    Declaration
    public readonly double X
    Field Value
    Type Description
    System.Double

    Y

    Declaration
    public readonly double Y
    Field Value
    Type Description
    System.Double

    Zero

    Declaration
    public static readonly Vector2D Zero
    Field Value
    Type Description
    Vector2D

    Methods

    AngleAboutZ()

    Declaration
    public double AngleAboutZ()
    Returns
    Type Description
    System.Double

    Equals(Vector2D)

    Will return true when comparing two System.Double.NaN values, per IEEE754

    Declaration
    public bool Equals(Vector2D other)
    Parameters
    Type Name Description
    Vector2D other
    Returns
    Type Description
    System.Boolean

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    Overrides
    System.ValueType.Equals(System.Object)

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.ValueType.GetHashCode()

    Magnitude()

    Declaration
    public double Magnitude()
    Returns
    Type Description
    System.Double

    Polar(Double, Double)

    Returns a new Vector2D with specified radius and angle about the Z axis (measured anticlockwise from positive X)

    Declaration
    public static Vector2D Polar(double radius, double theta)
    Parameters
    Type Name Description
    System.Double radius
    System.Double theta
    Returns
    Type Description
    Vector2D

    Operators

    Addition(Vector2D, Vector2D)

    Declaration
    public static Vector2D operator +(Vector2D a, Vector2D b)
    Parameters
    Type Name Description
    Vector2D a
    Vector2D b
    Returns
    Type Description
    Vector2D

    Equality(Vector2D, Vector2D)

    Returns false if either vector contains System.Double.NaN, per IEEE754

    Declaration
    public static bool operator ==(Vector2D left, Vector2D right)
    Parameters
    Type Name Description
    Vector2D left
    Vector2D right
    Returns
    Type Description
    System.Boolean

    Inequality(Vector2D, Vector2D)

    Returns true if either vector contains System.Double.NaN, per IEEE754

    Declaration
    public static bool operator !=(Vector2D left, Vector2D right)
    Parameters
    Type Name Description
    Vector2D left
    Vector2D right
    Returns
    Type Description
    System.Boolean

    Subtraction(Vector2D, Vector2D)

    Declaration
    public static Vector2D operator -(Vector2D a, Vector2D b)
    Parameters
    Type Name Description
    Vector2D a
    Vector2D b
    Returns
    Type Description
    Vector2D

    Implements

    System.IEquatable<T>
    Back to top