mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8283124: Add constant for tau to Math and StrictMath
Reviewed-by: bpb, iris
This commit is contained in:
parent
671b6efd61
commit
05a83e03ca
2 changed files with 29 additions and 3 deletions
|
@ -96,11 +96,24 @@ public final class StrictMath {
|
|||
|
||||
/**
|
||||
* The {@code double} value that is closer than any other to
|
||||
* <i>pi</i>, the ratio of the circumference of a circle to its
|
||||
* <i>pi</i> (π), the ratio of the circumference of a circle to its
|
||||
* diameter.
|
||||
*/
|
||||
public static final double PI = 3.141592653589793;
|
||||
|
||||
/**
|
||||
* The {@code double} value that is closer than any other to
|
||||
* <i>tau</i> (τ), the ratio of the circumference of a circle
|
||||
* to its radius.
|
||||
*
|
||||
* @apiNote
|
||||
* The value of <i>pi</i> is one half that of <i>tau</i>; in other
|
||||
* words, <i>tau</i> is double <i>pi</i> .
|
||||
*
|
||||
* @since 19
|
||||
*/
|
||||
public static final double TAU = 2.0 * PI;
|
||||
|
||||
/**
|
||||
* Returns the trigonometric sine of an angle. Special cases:
|
||||
* <ul><li>If the argument is NaN or an infinity, then the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue