Vector2 class

Vector2 class

A vector with two components.

The Vector2 type exposes the following members:

Constructors

ConstructorDescription
initInitializes a new instance of the Vector2 struct.
initInitializes a new instance of the Vector2 struct.
initInitializes a new instance of the Vector2 struct.
initInitializes a new instance of the Vector2 struct.
initConstructs a new instance of Vector2

Properties

PropertyDescription
uGets or sets the U component if the Vector2 is used as a mapping coordinate.
It’s an alias of x component.
vGets or sets the V component if the Vector2 is used as a mapping coordinate.
It’s an alias of y component.
lengthGets the length.

Methods

MethodDescription
dotGets the dot product of two vectors
equalsCheck if two vector2 equals
crossCross product of two vectors
normalizeNormalizes this instance.
compare_toCompare current vector to another instance.

See Also