🔢Vec2
Vec2 metatable
Fields
Name
Type
Description
x
number
y
number
Name
Type
Description
x
number
y
number
Create a new Vec2.
Vec2(): Vec2
Vec2
Create a new Vec2(0,0).
:__tostring(): string
string
Overload for operator +
Name
Type
Description
other
Overload for operator -
Name
Type
Description
other
Overload for operator /
Name
Type
Description
other
:Length(): number
number
Returns the length of the vector.
:Get(): number
, number
number
, number
Returns x, y of this vector.
:GetX(): number
number
Returns x of this vector. The same as Vec2.x.
:GetY(): number
number
Returns y of this vector. The same as Vec2.y.
:SetX(value: number
): nil
number
): nil
Name
Type
Description
value
number
Sets x. The same as Vec2.x = value.
:SetY(value: number
): nil
number
): nil
Name
Type
Description
value
number
Sets y. The same as Vec2.y = value.
Last updated