- Vector3 and Vector2 support for Lua.
- This module makes Vector process so much easier.
- You can install with
luarocks
easily.
luarocks install vector
- You can draw your
Vector2
's to png file.So you can compare them easily. (notVector3
) (requiresbit
package.It's embedded package in LuaJIT.) - Metatable functions for all Vectors :
add
,sub
,mul
,unm
,div
,tostring
,eq
.
Example:
local vector = require("vector")
print(tostring(vector.vector2.new(2,2)+vector.vector2.new(1,6)))
--> prints: Vector2(3,8).
- Drawing functions slows down when resulation is greater than (512x512).
- You can check examples folder for all examples.