Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-3641

Added new rounding methods to Float and Double that take a precision being the number of decimal places to round to

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 1.6.3
    • 1.6.4, 1.7-beta-1
    • groovy-jdk
    • None
    • Patch

    Description

      Added new rounding methods to Float and Double that take a precision being the number of decimal places to round to.

      This is a convenience method for Float and Double.

      Usage:

      someDouble.round(2) will round someDouble to 2 decimal places.

      Attachments

        1. patchfile.txt
          7 kB
          Brad Long

        Activity

          People

            paulk Paul King
            xagyg Brad Long
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: