Can anyone give me a quick tip?
For example....how would I find the sine of 90 degrees?
Can anyone give me a quick tip?
For example....how would I find the sine of 90 degrees?
You could use the Math.sin function where the argument is given in radians. Example:
double result = Math.sin(Math.PI / 3.0);
http://java.sun.com/j2se/1.6.0/docs/api/java/lang/Math.html
It has a sin(double)
method among other mathematical functions. It takes the angle in radian, so you'd have to do the conversion from degree. For that purpose (and others), Math also has the PI
constant.
A few tips for you:
What if you combine these two tips?
The Sin function expects radians.
I think you should use Math.sin(Math.toRadians(90))