Vector2
Fields
Name | Type | Description |
---|---|---|
x | float | - |
y | float | - |
Functions
new
This function has no parameters.
Return value
Name | Type | Description |
---|---|---|
value | Vector2 | New instance of a Vector2 |
local my_vec2 = Vector2.new()
new
Name | Type | Description |
---|---|---|
x | float | X value |
y | float | Y value |
Return value
Name | Type | Description |
---|---|---|
value | Vector2 | New instance of a Vector2 |
local my_vec2 = Vector2.new(1.0, 2.0)
Length
This function has no parameters.
Return value
Name | Type | Description |
---|---|---|
value | float | Vector length |
local vec = Vector2.new(1.0, 2.0)
local dist = vec:Length()