function ScreenSpace.GetDepthForWidth(q,y)local K=ScreenSpace.AspectRatio()local b=math.tan(math.rad(workspace.CurrentCamera.FieldOfView)/2)local d=K*b local c,E=ScreenSpace.ViewSizeX(),ScreenSpace.ViewSizeY()return-(c*y)/((q*2)*d)end function ScreenSpace.GetDepthForHeight(q,y)local K=math.tan(math.rad(workspace.CurrentCamera.FieldOfView)/2)local b=ScreenSpace.ViewSizeY()return-(b*y)/((q*2)*K)end

function ScreenSpace.GetDepthForWidth(screenWidth, worldWidth)
	local aspectRatio = ScreenSpace.AspectRatio()
	local hfactor = math.tan(math.rad(workspace.CurrentCamera.FieldOfView)/2)
	local wfactor = aspectRatio*hfactor
	local sx, sy = ScreenSpace.ViewSizeX(), ScreenSpace.ViewSizeY()
	--
	return -(sx * worldWidth) / (screenWidth * 2 * wfactor)
end
function ScreenSpace.GetDepthForHeight(screenHeight, worldHeight)
	local hfactor = math.tan(math.rad(workspace.CurrentCamera.FieldOfView)/2)
	local sy = ScreenSpace.ViewSizeY()
	--
	return -(sy * worldHeight) / (screenHeight * 2 * hfactor)
end
