function AngleOfReach(B,v,C)local l=math.atan((C^2+math.sqrt(C^4-200*(200*B^2+(2*v)*C^2)))/(200*B))if l~=l then l=math.pi/4 end return l end

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