Files
itgmania212121/Themes/default/Scripts/02 Utilities.lua
T

6 lines
269 B
Lua
Raw Normal View History

2017-08-08 01:07:34 -06:00
-- Placed here to keep shit from breaking until I get myself together long enough to deal with it all
function scale_to_fit(actor, width, height)
local xscale= width / actor:GetWidth()
local yscale= height / actor:GetHeight()
actor:zoom(math.min(xscale, yscale))
end