Hi i’ve been trying to make games for a while i finally got drawing to screen done, then another prob. crops up.
How do i get the direction from one point to another ie Bearing in degrees?
I probably should mention that all the Math.* methods work in radians, not degrees. Remember if you want to convert between then 2Pi radians = 360 degrees.
As all functions in Java are using radians, it doesn’t make sense to store them in degrees as you’ll have to convert them back and forth. Things get trickier if you use OpenGL though as it uses degrees… xD
Because System.out.println(Math.toDegrees(degrees)); is harder to write and more error prone compared to using it every time you set the value, plus toRadians() when you use it. >_>