Return type | Name and parameters |
---|---|
double
|
abs()
Get 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. |
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
, 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
addShutdownHook
, any
, any
, asBoolean
, asType
, average
, 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
, stream
, sum
, sum
, tap
, toArrayString
, toSpreadMap
, toString
, use
, use
, use
, with
, with
, withTraits
Get 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 numberRound 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