91
Java Math.sin() method
The java.lang.Math.sin() is used to return the trigonometric sine of an angle. This method returns value between -1 to 1.
Syntax
Parameter
Return
- If the argument is positive or negative number, this method will return the Sine value.
- If the argument is NaN or infinity, this method will return NaN.
- If the argument is zero, this method will return zero with the same sign as the argument.
Example 1
Output:
0.8660254037844386
Example 2
Output:
1.0
Example 3
Output:
NaN
Example 4
Output:
-0.9285211870146288
Next TopicJava Math