Cleaner tostring output for vec3

This commit is contained in:
Colby Klein 2015-05-05 01:59:41 -07:00
parent d004860628
commit 58b3b30b4b

View File

@ -55,7 +55,7 @@ function vector:unpack()
end
function vector:__tostring()
return "("..tonumber(self.x)..","..tonumber(self.y)..","..tonumber(self.z)..")"
return string.format("(%+0.3f,%+0.3f,%+0.3f)", self.x, self.y, self.z)
end
function vector.__unm(a)