Version: 13.0

    Show / Hide Table of Contents

    Struct Vector2D

    Implements
    System.IEquatable<Vector2D>
    Inherited Members
    System.ValueType.ToString()
    Namespace: SMT.MastaAPI.MathUtility
    Assembly: SMT.MastaAPI.13.0.dll
    Syntax
    [Serializable]
    public readonly 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 readonly double AngleAboutZ()
    Returns
    Type Description
    System.Double

    Equals(Vector2D)

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

    Equals(Object)

    Declaration
    public override readonly 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 readonly int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.ValueType.GetHashCode()

    Magnitude()

    Declaration
    public readonly 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
    [Pure]
    public static Vector2D operator +(Vector2D a, Vector2D b)
    Parameters
    Type Name Description
    Vector2D a
    Vector2D b
    Returns
    Type Description
    Vector2D

    Subtraction(Vector2D, Vector2D)

    Declaration
    [Pure]
    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