function AngleOfReach(R,u,l)local f=math.atan((l^2+math.sqrt(l^4-196.2*(196.2*R^2+(2*u)*l^2)))/(196.2*R))if f~=f then f=math.pi/4 end return f end

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