Java – Find sine in Java

javamath

Can anyone give me a quick tip?

For example….how would I find the sine of 90 degrees?

Best Answer

The sin function in java.lang.Math expects a parameter expressed in radians.

I think you should use Math.sin(Math.toRadians(90))