return function()if tick()-lastCalcTick<=.05 then return lastCalc end local K=camera.ViewportSize local L=K.Magnitude local M=math.clamp(L/1800,.33,1)lastCalc=M lastCalcTick=tick()return M end
--[[
	
	Calculates a ratio for interface scaling based on resolution (screen size). Used for scaling down, not up.
	
	Functions.ResolutionScale()
	
--]]

return function()
	--- Return cache
	if tick() - lastCalcTick <= 0.05 then
		return lastCalc
	end

	--- calc
	local resolution = camera.ViewportSize
	local resolutionScale = resolution.Magnitude
	local scale = math.clamp(resolutionScale / 1800, 0.33, 1)

	--- Cache
	lastCalc = scale
	lastCalcTick = tick()

	--
	return scale
end
