Vector2

Vector2 structure

A vector with two components.

public struct Vector2 : IComparable<Vector2>

Constructors

Name Description
Vector2(double) Initializes a new instance of the Vector2 struct.
Vector2(FVector2) Initializes a new instance of the Vector2 struct.
Vector2(double, double) Initializes a new instance of the Vector2 struct.

Properties

Name Description
Length { get; } Gets the length.
U { get; set; } Gets or sets the U component if the Vector2 is used as a mapping coordinate. It’s an alias of x component.
V { get; set; } Gets or sets the V component if the Vector2 is used as a mapping coordinate. It’s an alias of y component.

Methods

Name Description
CompareTo(Vector2) Compare current vector to another instance.
Cross(Vector2) Cross product of two vectors
Dot(Vector2) Gets the dot product of two vectors
override Equals(object) Check if two vector2 equals
Equals(Vector2) Check if two vector2 equals
override GetHashCode() Gets the hash code of Vector2
Normalize() Normalizes this instance.
override ToString() Returns a String that represents the current Vector2.
operator + Addition operator for Vector2
operator / Division operator for Vector2
operator == Equal operator for Vector2
explicit operator
operator != Not-equal operator for Vector2
operator * Multiply operator for Vector2 (2 operators)
operator - Subtraction operator for Vector2

Fields

Name Description
x The x component.
y The y component.

See Also