StrictMath.sin(): This method is available in java.lang.StrictMath class of Java.
Syntax:
double java.lang.StrictMath.sin(double a)
This method takes one argument of type double as its parameter. This method returns the trigonometric sine of an angle.
Note:
1. If the argument is NaN or an infinity, then the result is NaN.
2. If the argument is zero, then the result is a zero with the same sign as the argument.
Parameters: One parameter is required for this method.
a: an angle, in radians.
Returns: the sine of the argument.
Exceptions: NA
Approach
Java
public class StrictMathsin {public static void main(String[] args) {double a = 0.167;System.out.println(StrictMath.sin(a));}}
Output:
0.16622483788139697
No comments:
Post a Comment