This is what the code looks like right now:
double angle = Math.Atan(terminalVelocityY / ball.CurrentSpeedX) * 180 / Math.PI;
It doesn't work for the full 360 degree because the Arctangens repeats after 180 degrees.
Does anyone know how to solve this? Is there a two-parameter version for this method hidden somewhere, because that would work. The error stems from the method not knowing the individual signs of the two numbers, as it passes those along as one number, with one sign. i.e., a movement with the coordinates (2, 3) will be treated the same as one with (-2, -3).


Sign In
Create Account


Back to top









