summaryrefslogtreecommitdiff
path: root/examples/resources/lib/vector2.lua
diff options
context:
space:
mode:
Diffstat (limited to 'examples/resources/lib/vector2.lua')
-rw-r--r--examples/resources/lib/vector2.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/resources/lib/vector2.lua b/examples/resources/lib/vector2.lua
index 0446473..70a2a35 100644
--- a/examples/resources/lib/vector2.lua
+++ b/examples/resources/lib/vector2.lua
@@ -49,12 +49,12 @@ function Vector2:new( x, y )
x, y = 0, 0
end
- local o = {
- x = x,
- y = y,
- }
- setmetatable( o, Vector2.meta )
- return o
+ local object = setmetatable( {}, Vector2.meta )
+
+ object.x = x
+ object.y = y
+
+ return object
end
function Vector2:set( x, y )