Added unit vectors.

This commit is contained in:
Matthew Blanchard 2015-12-24 16:49:21 -05:00
parent 2b35d4ae57
commit 4302b2b5dc

View File

@ -299,6 +299,10 @@ function vec3_mt.__div(a, b)
return temp
end
vec3.unit_x = vec3.new(1, 0, 0)
vec3.unit_y = vec3.new(0, 1, 0)
vec3.unit_z = vec3.new(0, 0, 1)
if status then
ffi.metatype(new, vec3_mt)
end