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.

Since Kotlin

1.0

Types

Link copied to clipboard
object Companion
Since Kotlin 1.0

Functions

Link copied to clipboard
fun Double.coerceAtLeast(minimumValue: Double): Double

Ensures that this value is not less than the specified minimumValue.

Since Kotlin 1.0
Link copied to clipboard
fun Double.coerceAtMost(maximumValue: Double): Double

Ensures that this value is not greater than the specified maximumValue.

Since Kotlin 1.0
Link copied to clipboard
fun Double.coerceIn(minimumValue: Double, maximumValue: Double): Double

Ensures that this value lies in the specified range minimumValue..maximumValue.

Since Kotlin 1.0
Link copied to clipboard
operator fun compareTo(other: Byte): Int
open operator override fun compareTo(other: Double): Int
operator fun compareTo(other: Float): Int
operator fun compareTo(other: Int): Int
operator fun compareTo(other: Long): Int
operator fun compareTo(other: Short): 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.

Since Kotlin 1.0
Link copied to clipboard
operator fun dec(): Double

Returns this value decremented by one.

Since Kotlin 1.0
Link copied to clipboard
operator fun div(other: Byte): Double
operator fun div(other: Double): Double
operator fun div(other: Float): Double
operator fun div(other: Int): Double
operator fun div(other: Long): Double
operator fun div(other: Short): Double

Divides this value by the other value.

Since Kotlin 1.0
Link copied to clipboard
operator fun inc(): Double

Returns this value incremented by one.

Since Kotlin 1.0
Link copied to clipboard
expect fun Double.isFinite(): Boolean
Since Kotlin 1.0
Link copied to clipboard
expect fun Double.isInfinite(): Boolean
Since Kotlin 1.0
Link copied to clipboard
expect fun Double.isNaN(): Boolean
Since Kotlin 1.0
Link copied to clipboard
operator fun minus(other: Byte): Double
operator fun minus(other: Double): Double
operator fun minus(other: Float): Double
operator fun minus(other: Int): Double
operator fun minus(other: Long): Double
operator fun minus(other: Short): Double

Subtracts the other value from this value.

Since Kotlin 1.0
Link copied to clipboard
operator fun plus(other: Byte): Double
operator fun plus(other: Double): Double
operator fun plus(other: Float): Double
operator fun plus(other: Int): Double
operator fun plus(other: Long): Double
operator fun plus(other: Short): Double

Adds the other value to this value.

Since Kotlin 1.0
Link copied to clipboard
operator fun times(other: Byte): Double
operator fun times(other: Double): Double
operator fun times(other: Float): Double
operator fun times(other: Int): Double
operator fun times(other: Long): Double
operator fun times(other: Short): Double

Multiplies this value by the other value.

Since Kotlin 1.0
Link copied to clipboard
open override fun toByte(): Byte

Converts this Double value to Byte.

Since Kotlin 1.0
Link copied to clipboard
open override fun toChar(): Char

Converts this Double value to Char.

Since Kotlin 1.0
Link copied to clipboard
open override fun toDouble(): Double

Returns this value.

Since Kotlin 1.0
Link copied to clipboard
open override fun toFloat(): Float

Converts this Double value to Float.

Since Kotlin 1.0
Link copied to clipboard
open override fun toInt(): Int

Converts this Double value to Int.

Since Kotlin 1.0
Link copied to clipboard
open override fun toLong(): Long

Converts this Double value to Long.

Since Kotlin 1.0
Link copied to clipboard
open override fun toShort(): Short

Converts this Double value to Short.

Since Kotlin 1.0
Link copied to clipboard
operator fun unaryMinus(): Double

Returns the negative of this value.

Since Kotlin 1.0
Link copied to clipboard
operator fun unaryPlus(): Double

Returns this value.

Since Kotlin 1.0