Lua API
On this page
Vector2
Tip
This is a builtin dotnet type. The documentation and api interface are generated from dotnet source files.
Represents a vector with two single-precision floating-point values.
Fields:
X number
The X component of the vector.
Y number
The Y component of the vector.
Constructors:
New(value: number) :
Creates a new Vector2 object whose two elements have the same value.
Name | Type | Default | Summary |
value | number | The value to assign to both elements. |
New(x: number, y: number) :
Methods:
CopyTo(array: number, index: number) : nil
Copies the elements of the vector to a specified array starting at a specified index position.
Name | Type | Default | Summary |
array | number | The destination array. | |
index | number | The index at which to copy the first element of the vector. |
Returns:nil
CopyTo(array: number) : nil
Copies the elements of the vector to a specified array.
Name | Type | Default | Summary |
array | number | The destination array. |
Returns:nil