function AngleOfReach(s,m,h)local f=workspace.Gravity local S=math.atan((h^2+math.sqrt(h^4-f*(f*s^2+(2*m)*h^2)))/(f*s))if S~=S then S=math.pi/4 end return S end

function AngleOfReach(distance, altitude, velocity)
	local gravity = workspace.Gravity
	local theta = math.atan((velocity^2 + math.sqrt(velocity^4 -gravity*(gravity*distance^2 + 2*altitude*velocity^2)))/(gravity*distance))
	if theta ~= theta then
		theta = math.pi/4
	end
	return(theta)
end
