class Double : Number, Comparable<Double>
Represents a double-precision 64-bit IEEE 754 floating point number. On the JVM, non-nullable values of this type are represented as values of the primitive type double
.
operator fun compareTo(other: Byte): Int operator fun compareTo(other: Short): Int operator fun compareTo(other: Int): Int operator fun compareTo(other: Long): Int operator fun compareTo(other: Float): Int operator fun compareTo(other: Double): Int Compares this value with the specified value for order. Returns zero if this value is equal to the specified other value, a negative number if it's less than other, or a positive number if it's greater than other. | |
operator fun dec(): Double Decrements this value. | |
operator fun div(other: Byte): Double operator fun div(other: Short): Double operator fun div(other: Int): Double operator fun div(other: Long): Double operator fun div(other: Float): Double operator fun div(other: Double): Double Divides this value by the other value. | |
operator fun inc(): Double Increments this value. | |
operator fun minus(other: Byte): Double operator fun minus(other: Short): Double operator fun minus(other: Int): Double operator fun minus(other: Long): Double operator fun minus(other: Float): Double operator fun minus(other: Double): Double Subtracts the other value from this value. | |
operator fun mod(other: Byte): Double operator fun mod(other: Short): Double operator fun mod(other: Int): Double operator fun mod(other: Long): Double operator fun mod(other: Float): Double operator fun mod(other: Double): Double Calculates the remainder of dividing this value by the other value. | |
operator fun plus(other: Byte): Double operator fun plus(other: Short): Double operator fun plus(other: Int): Double operator fun plus(other: Long): Double operator fun plus(other: Float): Double operator fun plus(other: Double): Double Adds the other value to this value. | |
operator fun rem(other: Byte): Double operator fun rem(other: Short): Double operator fun rem(other: Int): Double operator fun rem(other: Long): Double operator fun rem(other: Float): Double operator fun rem(other: Double): Double Calculates the remainder of dividing this value by the other value. | |
operator fun times(other: Byte): Double operator fun times(other: Short): Double operator fun times(other: Int): Double operator fun times(other: Long): Double operator fun times(other: Float): Double operator fun times(other: Double): Double Multiplies this value by the other value. | |
fun toByte(): Byte Returns the value of this number as a Byte, which may involve rounding or truncation. | |
fun toChar(): Char Returns the Char with the numeric value equal to this number, truncated to 16 bits if appropriate. | |
fun toDouble(): Double Returns the value of this number as a Double, which may involve rounding. | |
fun toFloat(): Float Returns the value of this number as a Float, which may involve rounding. | |
fun toInt(): Int Returns the value of this number as an Int, which may involve rounding or truncation. | |
fun toLong(): Long Returns the value of this number as a Long, which may involve rounding or truncation. | |
fun toShort(): Short Returns the value of this number as a Short, which may involve rounding or truncation. | |
operator fun unaryMinus(): Double Returns the negative of this value. | |
operator fun unaryPlus(): Double Returns this value. |
val MAX_VALUE: Double A constant holding the largest positive finite value of Double. | |
val MIN_VALUE: Double A constant holding the smallest positive nonzero value of Double. | |
val NEGATIVE_INFINITY: Double A constant holding the negative infinity value of Double. | |
val NaN: Double A constant holding the "not a number" value of Double. | |
val POSITIVE_INFINITY: Double A constant holding the positive infinity value of Double. |
val Double.absoluteValue: Double Returns the absolute value of this value. | |
val Double.sign: Double Returns the sign of this value: | |
val Double.ulp: Double Returns the ulp (unit in the last place) of this value. |
fun Double.IEEErem(divisor: Double): Double Computes the remainder of division of this value by the divisor value according to the IEEE 754 standard. | |
fun Double.coerceAtLeast(minimumValue: Double): Double Ensures that this value is not less than the specified minimumValue. | |
fun Double.coerceAtMost(maximumValue: Double): Double Ensures that this value is not greater than the specified maximumValue. | |
fun Double.coerceIn( minimumValue: Double, maximumValue: Double ): Double Ensures that this value lies in the specified range minimumValue..maximumValue. | |
fun Double.isFinite(): Boolean Returns | |
fun Double.isInfinite(): Boolean Returns | |
fun Double.isNaN(): Boolean Returns | |
fun Double.nextDown(): Double Returns the Double value nearest to this value in direction of negative infinity. | |
fun Double.nextTowards(to: Double): Double Returns the Double value nearest to this value in direction from this value towards the value to. | |
fun Double.nextUp(): Double Returns the Double value nearest to this value in direction of positive infinity. | |
fun Double.pow(x: Double): Double Raises this value to the power x. fun Double.pow(n: Int): Double Raises this value to the integer power n. | |
operator fun Double.rangeTo( that: Double ): ClosedFloatingPointRange<Double> Creates a range from this Double value to the specified that value. | |
fun Double.roundToInt(): Int Rounds this Double value to the nearest integer and converts the result to Int. Ties are rounded towards positive infinity. | |
fun Double.roundToLong(): Long Rounds this Double value to the nearest integer and converts the result to Long. Ties are rounded towards positive infinity. | |
fun Double.toBigDecimal(): BigDecimal fun Double.toBigDecimal(mathContext: MathContext): BigDecimal Returns the value of this Double number as a BigDecimal. | |
fun Double.toBits(): Long Returns a bit representation of the specified floating-point value as Long according to the IEEE 754 floating-point "double format" bit layout. | |
fun Double.toRawBits(): Long Returns a bit representation of the specified floating-point value as Long according to the IEEE 754 floating-point "double format" bit layout, preserving | |
fun Double.withSign(sign: Double): Double fun Double.withSign(sign: Int): Double Returns this value with the sign bit same as of the sign value. |
fun Double.Companion.fromBits(bits: Long): Double Returns the Double value corresponding to a given bit representation. |
© 2010–2018 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html