Java Math.cos() methodThe java.lang.Math.cos() is used to return the trigonometric cosine of an angle. This method returns value between -1 to 1. SyntaxParameterReturn
Example 1Test it NowOutput: 0.5000000000000001 Example 2Test it NowOutput: 1.0 Example 3Test it NowOutput: NaN Example 4Test it NowOutput: 0.37127941669980136
Next TopicJava Math
|