diff options
| author | jussi | 2024-02-10 21:06:09 +0200 |
|---|---|---|
| committer | jussi | 2024-02-10 21:06:09 +0200 |
| commit | 6557a2ebca62c6670736b4ec2914a2aca60dbdba (patch) | |
| tree | 03a839d7eb4b9bddf3a694a163724ca8d59c819e /examples/resources/lib/quaternion.lua | |
| parent | eda4eacfce4f62ca09fb4f6559f9b7aeabe3cc31 (diff) | |
| download | reilua-enhanced-6557a2ebca62c6670736b4ec2914a2aca60dbdba.tar.gz reilua-enhanced-6557a2ebca62c6670736b4ec2914a2aca60dbdba.tar.bz2 reilua-enhanced-6557a2ebca62c6670736b4ec2914a2aca60dbdba.zip | |
Build option for Lua events that is off by default.
Diffstat (limited to 'examples/resources/lib/quaternion.lua')
| -rw-r--r-- | examples/resources/lib/quaternion.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/resources/lib/quaternion.lua b/examples/resources/lib/quaternion.lua index e85415c..56b5c49 100644 --- a/examples/resources/lib/quaternion.lua +++ b/examples/resources/lib/quaternion.lua @@ -7,7 +7,7 @@ local Vector3 = require( "vector3" ) local Matrix = require( "matrix" ) local Quaternion = {} -Quaternion.meta = { +local metatable = { __index = Quaternion, __tostring = function( q ) return "{"..tostring( q.x )..", "..tostring( q.y )..", "..tostring( q.z )..", "..tostring( q.w ).."}" @@ -45,7 +45,7 @@ function Quaternion:new( x, y, z, w ) x, y, z, w = 0, 0, 0, 1 -- QuaternionIdentity. end - local object = setmetatable( {}, Quaternion.meta ) + local object = setmetatable( {}, metatable ) object.x = x object.y = y |
