Skip to main content
Version: latest - a1.7.0 βš–οΈ

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​

TypeNameDescription
numberXX Coordinate
numberYY Coordinate