Search Results for

    Show / Hide Table of Contents

    Struct Vector2D

    Represents a geometric 2D vector.

    Inherited Members
    System.ValueType.Equals(System.Object)
    System.ValueType.GetHashCode()
    System.ValueType.ToString()
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    Namespace: TopSolid.Kernel.Automating
    Assembly: cs.temp.dll.dll
    Syntax
    [AvailableSinceVersion(7, 6, 0, 0)]
    public struct Vector2D
    Remarks

    This structure is available since v7.6.

    Constructors

    Vector2D(Double, Double)

    Initializes a new instance of the Vector2D structure with its coordinates.

    Declaration
    public Vector2D(double inX, double inY)
    Parameters
    Type Name Description
    System.Double inX

    X component.

    System.Double inY

    Y component.

    Fields

    V0

    Null vector, i.e. (0,0).

    Declaration
    public static readonly Vector2D V0
    Field Value
    Type Description
    Vector2D

    VX

    Positive X unit vector, i.e. (1,0).

    Declaration
    public static readonly Vector2D VX
    Field Value
    Type Description
    Vector2D

    VY

    Positive Y unit vector, i.e. (0,1).

    Declaration
    public static readonly Vector2D VY
    Field Value
    Type Description
    Vector2D

    X

    X component.

    Declaration
    public double X
    Field Value
    Type Description
    System.Double

    Y

    Y component.

    Declaration
    public double Y
    Field Value
    Type Description
    System.Double

    Properties

    Norm

    Gets the vector's norm.

    Declaration
    public readonly double Norm { get; }
    Property Value
    Type Description
    System.Double

    Vector's norm.

    Operators

    Addition(Vector2D, Vector2D)

    Adds two vectors.

    Declaration
    public static Vector2D operator +(Vector2D inVector1, Vector2D inVector2)
    Parameters
    Type Name Description
    Vector2D inVector1

    Left hand side vector.

    Vector2D inVector2

    Right hand side vector.

    Returns
    Type Description
    Vector2D

    Vectors' sum.

    Division(Vector2D, Double)

    Divides a vector by a double value.

    Declaration
    public static Vector2D operator /(Vector2D inVector, double inD)
    Parameters
    Type Name Description
    Vector2D inVector

    Left hand side vector.

    System.Double inD

    Right hand side double.

    Returns
    Type Description
    Vector2D

    Scaled vector.

    ExclusiveOr(Vector2D, Vector2D)

    Computes the cross product of two vectors.

    Declaration
    public static double operator ^(Vector2D inVector1, Vector2D inVector2)
    Parameters
    Type Name Description
    Vector2D inVector1

    Left hand side vector.

    Vector2D inVector2

    Right hand side vector.

    Returns
    Type Description
    System.Double

    Vectors' cross product "Z" component.

    Explicit(Vector2D to Direction2D)

    Casts a vector into a direction.

    Declaration
    public static explicit operator Direction2D(Vector2D inVector)
    Parameters
    Type Name Description
    Vector2D inVector
    Returns
    Type Description
    Direction2D

    Multiply(Double, Vector2D)

    Multiplies a double value and a vector.

    Declaration
    public static Vector2D operator *(double inD, Vector2D inVector)
    Parameters
    Type Name Description
    System.Double inD

    Left hand side double.

    Vector2D inVector

    Right hand side vector.

    Returns
    Type Description
    Vector2D

    Scaled vector.

    Multiply(Vector2D, Double)

    Multiplies a vector and a double value.

    Declaration
    public static Vector2D operator *(Vector2D inVector, double inD)
    Parameters
    Type Name Description
    Vector2D inVector

    Left hand side vector.

    System.Double inD

    Right hand side double.

    Returns
    Type Description
    Vector2D

    Scaled vector.

    Multiply(Vector2D, Vector2D)

    Computes the dot product of two vectors.

    Declaration
    public static double operator *(Vector2D inVector1, Vector2D inVector2)
    Parameters
    Type Name Description
    Vector2D inVector1

    Left hand side vector.

    Vector2D inVector2

    Right hand side vector.

    Returns
    Type Description
    System.Double

    Vectors' dot product.

    Subtraction(Vector2D, Vector2D)

    Subtracts two vectors.

    Declaration
    public static Vector2D operator -(Vector2D inVector1, Vector2D inVector2)
    Parameters
    Type Name Description
    Vector2D inVector1

    Left hand side vector.

    Vector2D inVector2

    Right hand side vector.

    Returns
    Type Description
    Vector2D

    Vectors' subtraction.

    UnaryNegation(Vector2D)

    Negates a vector.

    Declaration
    public static Vector2D operator -(Vector2D inVector)
    Parameters
    Type Name Description
    Vector2D inVector

    Vector to negate.

    Returns
    Type Description
    Vector2D

    Negated vector.

    In This Article
    • Mentions légales
    • C.G.U
    • Données personnelles

    Copyright © 2024 TopSolid Tous droits réservés