Package: java.lang

## Class Double

- - ### Methods Summary

    Methods
    Return type | Name and parameters
    --- | ---
    `double` | `abs()` Get the absolute value
    `void` | `downto(Number to, Closure closure)` Iterates from this number down to the given number, inclusive, decrementing by one each time.
    `long` | `round()` Round the value
    `double` | `round(int precision)` Round the value
    `double` | `trunc()` Truncate the value
    `double` | `trunc(int precision)` Truncate the value
    `void` | `upto(Number to, Closure closure)` Iterates from this number up to the given number, inclusive, incrementing by one each time.

  - #### Methods inherited from class java.lang.Number

    `abs`, `and`, `asBoolean`, `asType`, `bitwiseNegate`, `compareTo`, `compareTo`, `div`, `div`, `downto`, `intdiv`, `intdiv`, `isCase`, `leftShift`, `minus`, `minus`, `mod`, `multiply`, `multiply`, `next`, `or`, `plus`, `plus`, `plus`, `power`, `previous`, `rightShift`, `rightShiftUnsigned`, `step`, `times`, `toBigDecimal`, `toBigInteger`, `toDouble`, `toFloat`, `toInteger`, `toLong`, `unaryMinus`, `unaryPlus`, `upto`, `xor`

  - #### Methods inherited from class java.lang.Object

    `addShutdownHook`, `any`, `any`, `asBoolean`, `asType`, `collect`, `collect`, `collect`, `contains`, `count`, `dump`, `each`, `eachWithIndex`, `equals`, `every`, `every`, `find`, `find`, `findAll`, `findAll`, `findIndexOf`, `findIndexOf`, `findIndexValues`, `findIndexValues`, `findLastIndexOf`, `findLastIndexOf`, `findResult`, `findResult`, `flatten`, `getAt`, `getMetaClass`, `getMetaPropertyValues`, `getProperties`, `grep`, `grep`, `groupBy`, `groupBy`, `hasProperty`, `identity`, `inject`, `inject`, `inspect`, `invokeMethod`, `is`, `isCase`, `iterator`, `join`, `metaClass`, `print`, `print`, `printf`, `printf`, `println`, `println`, `println`, `putAt`, `respondsTo`, `respondsTo`, `setMetaClass`, `size`, `split`, `sprintf`, `sprintf`, `sum`, `sum`, `tap`, `toArrayString`, `toSpreadMap`, `toString`, `use`, `use`, `use`, `with`, `with`, `withTraits`

  - #### Methods inherited from interface java.lang.Comparable

    `numberAwareCompareTo`

- - ### Methods Detail

    - #### public double abs()

      Get the absolute value

      Returns:
        the absolute value of that Double
      Since:
        1.0

    - #### public void downto(Number to, Closure closure)

      Iterates from this number down to the given number, inclusive, decrementing by one each time.

      Parameters:
        `to` - the end number
        `closure` - the code to execute for each number
      Since:
        1.0

    - #### public long round()

      Round the value

      Returns:
        the rounded value of that Double
      Since:
        1.0

    - #### public double round(int precision)

      Round the value

      Parameters:
        `precision` - the number of decimal places to keep
      Returns:
        the Double rounded to the number of decimal places specified by precision
      Since:
        1.6.4

    - #### public double trunc()

      Truncate the value

      Returns:
        the Double truncated to 0 decimal places
      Since:
        1.6.4

    - #### public double trunc(int precision)

      Truncate the value

      Parameters:
        `precision` - the number of decimal places to keep
      Returns:
        the Double truncated to the number of decimal places specified by precision
      Since:
        1.6.4

    - #### public void upto(Number to, Closure closure)

      Iterates from this number up to the given number, inclusive, incrementing by one each time.

      Parameters:
        `to` - the end number
        `closure` - the code to execute for each number
      Since:
        1.0