Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8283136

Add constant for tau to Math and StrictMath

    XMLWordPrintable

Details

    • CSR
    • Resolution: Approved
    • P4
    • 19
    • core-libs
    • None
    • minimal
    • Adding a static constant.
    • Java API
    • SE

    Description

      Summary

      Add a constant for tau, a value equal to pi*2.

      Problem

      Many mathematical formulas use "2*pi" as a value, making giving that quantity a distinct name useful.

      Solution

      Add a constant for tau to java.lang.Math and java.lang.StrictMath, alongside the constants for pi.

      Specification

      In both java.lang.Math and java.lang.StrictMath add:

      /**
       * The {@code double} value that is closer than any other to
       * <i>tau</i> (&tau;), 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;

      Attachments

        Issue Links

          Activity

            People

              darcy Joe Darcy
              darcy Joe Darcy
              Brian Burkhalter
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: