Return type | Name and parameters |
---|---|
double
|
abs()
Gets the absolute value. |
boolean
|
asBoolean()
Coerce a Double instance to a boolean value. |
void
|
downto(Number to, Closure closure)
Iterates from this number down to the given number, inclusive, decrementing by one each time. |
boolean
|
equalsIgnoreZeroSign(Object other)
Compares this object against the specified object returning the same result as Double#equals(Object) but returning true if this object and the specified object are both zero and negative zero respectively or vice versa. |
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. |
abs
, and
, asBoolean
, asType
, bitwiseNegate
, compareTo
, compareTo
, div
, div
, downto
, intdiv
, intdiv
, isCase
, isNotCase
, leftShift
, minus
, minus
, mod
, multiply
, multiply
, next
, or
, plus
, plus
, plus
, power
, previous
, remainder
, rightShift
, rightShiftUnsigned
, step
, times
, toBigDecimal
, toBigInteger
, toDouble
, toFloat
, toInteger
, toLong
, unaryMinus
, unaryPlus
, upto
, xor
addShutdownHook
, any
, any
, asBoolean
, asType
, collect
, collect
, collect
, dump
, each
, eachMatch
, eachMatch
, eachWithIndex
, every
, every
, find
, find
, findAll
, findAll
, findIndexOf
, findIndexOf
, findIndexValues
, findIndexValues
, findLastIndexOf
, findLastIndexOf
, findResult
, findResult
, findResult
, findResult
, getAt
, getMetaClass
, getMetaPropertyValues
, getProperties
, grep
, grep
, hasProperty
, identity
, inject
, inject
, inspect
, invokeMethod
, is
, isCase
, isNotCase
, iterator
, metaClass
, print
, print
, printf
, printf
, println
, println
, println
, putAt
, respondsTo
, respondsTo
, setMetaClass
, split
, sprintf
, sprintf
, stream
, tap
, toString
, use
, use
, use
, with
, with
, withCloseable
, withMethodClosure
, withStream
, withTraits
Gets the absolute value.
Coerce a Double instance to a boolean value.
true
for non-zero and non-NaN values, else false
Iterates from this number down to the given number, inclusive, decrementing by one each time.
to
- the end numberclosure
- the code to execute for each numberCompares this object against the specified object returning the same result as Double#equals(Object) but returning true if this object and the specified object are both zero and negative zero respectively or vice versa.
Round the value
Round the value
precision
- the number of decimal places to keepTruncate the value
Truncate the value
precision
- the number of decimal places to keep