summaryrefslogtreecommitdiff
path: root/examples/resources/lib/vector3.lua
diff options
context:
space:
mode:
authorjussi2022-12-05 16:56:41 +0200
committerjussi2022-12-05 16:56:41 +0200
commitb3d2a9c0a2772cee0aeb94ffc1a7ad74b5286b6f (patch)
tree5ef56fafbf494767db3e3043de728e0c0ad4c384 /examples/resources/lib/vector3.lua
parentbdbd475ae30b75aaad113f913ed9c70668b471b8 (diff)
downloadreilua-enhanced-b3d2a9c0a2772cee0aeb94ffc1a7ad74b5286b6f.tar.gz
reilua-enhanced-b3d2a9c0a2772cee0aeb94ffc1a7ad74b5286b6f.tar.bz2
reilua-enhanced-b3d2a9c0a2772cee0aeb94ffc1a7ad74b5286b6f.zip
Working basic elements.
Diffstat (limited to 'examples/resources/lib/vector3.lua')
-rw-r--r--examples/resources/lib/vector3.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/resources/lib/vector3.lua b/examples/resources/lib/vector3.lua
index 0eb9d77..b93601e 100644
--- a/examples/resources/lib/vector3.lua
+++ b/examples/resources/lib/vector3.lua
@@ -47,13 +47,13 @@ function Vector3:new( x, y, z )
x, y, z = table.unpack( x )
end
- local o = {
- x = x,
- y = y,
- z = z,
- }
- setmetatable( o, Vector3.meta )
- return o
+ local object = setmetatable( {}, Vector3.meta )
+
+ object.x = x
+ object.y = y
+ object.z = z
+
+ return object
end
function Vector3:set( x, y, z )