function CameraUtils.mapClamp(G,l,E,Y,B)return math.clamp(((G-l)*(B-Y))/(E-l)+Y,math.min(Y,B),math.max(Y,B))end
-- maps a value from one range to another, clamping to the output range. order does not matter
function CameraUtils.mapClamp(x, inMin, inMax, outMin, outMax)
	return math.clamp(
		(x - inMin) * (outMax - outMin) / (inMax - inMin) + outMin,
		math.min(outMin, outMax),
		math.max(outMin, outMax)
	)
end
