Object libraries like Vector2 optimizations.
This commit is contained in:
@@ -50,31 +50,15 @@ Matrix.meta = {
|
||||
function Matrix:new( m )
|
||||
local object = setmetatable( {}, Matrix.meta )
|
||||
|
||||
if type( m ) == "table" then
|
||||
object.m = deepCopy( m )
|
||||
else
|
||||
object.m = RL.MatrixIdentity()
|
||||
end
|
||||
object.m = deepCopy( m )
|
||||
|
||||
return object
|
||||
end
|
||||
|
||||
function Matrix:set( m )
|
||||
if type( m ) == "table" then
|
||||
self.m = deepCopy( m )
|
||||
else
|
||||
self.m = RL.MatrixIdentity()
|
||||
end
|
||||
self.m = deepCopy( m )
|
||||
end
|
||||
|
||||
-- function Matrix:arr()
|
||||
-- return self.m
|
||||
-- end
|
||||
|
||||
-- function Matrix:unpack()
|
||||
-- return self.m
|
||||
-- end
|
||||
|
||||
function Matrix:clone()
|
||||
return Matrix:new( self )
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user