diff options
Diffstat (limited to 'math.lua')
| -rw-r--r-- | math.lua | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -8,7 +8,7 @@ Vec2.__mul = function(a, b) return a.x * b.x + a.y * b.y end Vec2.__div = function(a, b) return vec2(a.x / b.x, a.y / b.y) end -Vec2.__tostring = function(a) return "(" .. a.x .. "," .. a.y .. ")" end +Vec2.__tostring = function(a) return "(" .. fmt(a.x) .. "," .. fmt(a.y) .. ")" end function Vec2:magnitude() return sqrt(self.x * self.x + self.y * self.y) @@ -33,4 +33,4 @@ function normalize_scalar(x) if x == 0 then return 0 end if x < 0 then return -1 end return 1 -end
\ No newline at end of file +end |
