I've been struggling with Math.asin() for a while.
System.out.println(Math.toDegrees(Math.asin(1 / 2)));
This very simple line of code pretty much sums up my desperation: The result should be 30°, however, I only get 0.0 as a result. Its not just these numbers, no matter which numbers I use, the result is 0.0. My question is, is this a known bug of Java, or am I missing something?
Bonus Information: I need asin() to calculate the angle between the centerpoints of two objects in my game.