Vector2D
A Vector2D composed of components (X, Y) with floating point precision. Used mainly for HUD and Drawing on screen
info
Tip: This structure is Open Sourced at https://github.com/nanos-world/nanos-world-lua-lib. Feel free to push merge requests and suggest changes!
tip
Note: This structure supports +
, -
, *
, /
, ==
and tostring
operations.
Usageβ
local new_vector2D = Vector2D(1452.5, 512)
Propertiesβ
Type | Name | Description |
---|---|---|
number | X | X Coordinate |
number | Y | Y Coordinate |