Math.sin()
Signature
double sin (double a)
Description
Returns the trigonometric sine of an angle. Special cases:
If the argument is NaN or an infinity, then the result is NaN.
If the argument is zero, then the result is a zero with the
same sign as the argument.
A result must be within 1 ulp of the correctly rounded result. Results
must be semi-monotonic.
Parameters
Name | Type | Description |
a | double | An angle, in radians. |
Returns
Type | Description |
double | The sine of the argument. |
Example
String result = String.valueOfDouble (Math.sin (0.5));
Result is: result contains: "0.479425538604203"