mirror of
https://github.com/love2d/love.git
synced 2026-08-12 00:20:52 +02:00
Use getMatrix().inverse() instead of heap allocation.
This commit is contained in:
@@ -145,9 +145,7 @@ int w_Transform_inverseOf(lua_State *L)
|
||||
{
|
||||
Transform *destination = luax_checktransform(L, 1);
|
||||
Transform *source = luax_checktransform(L, 2);
|
||||
Transform *inverseSource = source->inverse();
|
||||
destination->setMatrix(inverseSource->getMatrix());
|
||||
inverseSource->release();
|
||||
destination->setMatrix(source->getMatrix().inverse());
|
||||
lua_pushvalue(L, 1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user