Float

expect class Float : Number, Comparable<Float> (source)

Represents a single-precision 32-bit IEEE 754 floating point number.

Since Kotlin

1.0
actual class Float : Number, Comparable<Float> (source)

Represents a single-precision 32-bit IEEE 754 floating point number.

Since Kotlin

1.1

Represents a single-precision 32-bit IEEE 754 floating point number. On the JVM, non-nullable values of this type are represented as values of the primitive type float.

Since Kotlin

1.0
actual class Float : Number, Comparable<Float> (source)

Represents a single-precision 32-bit IEEE 754 floating point number.

Since Kotlin

1.3
actual class Float : Number, Comparable<Float> (source)

Represents a single-precision 32-bit IEEE 754 floating point number.

Since Kotlin

1.8
actual class Float : Number, Comparable<Float> (source)

Represents a single-precision 32-bit IEEE 754 floating point number.

Since Kotlin

1.8

Types

Link copied to clipboard
expect object Companion
Since Kotlin 1.0
actual object Companion
Since Kotlin 1.1
object Companion
Since Kotlin 1.0
actual object Companion
Since Kotlin 1.3
actual object Companion
Since Kotlin 1.8
actual object Companion
Since Kotlin 1.8

Properties

Link copied to clipboard

Returns the absolute value of this value.

Since Kotlin 1.2

Returns the absolute value of this value.

Since Kotlin 1.2

Returns the absolute value of this value.

Since Kotlin 1.2

Returns the absolute value of this value.

Since Kotlin 1.3

Returns the absolute value of this value.

Since Kotlin 1.8

Returns the absolute value of this value.

Since Kotlin 1.8
Link copied to clipboard
expect val Float.sign: Float

Returns the sign of this value:

Since Kotlin 1.2
actual val Float.sign: Float

Returns the sign of this value:

Since Kotlin 1.2
actual val Float.sign: Float

Returns the sign of this value:

Since Kotlin 1.2
actual val Float.sign: Float

Returns the sign of this value:

Since Kotlin 1.3
actual val Float.sign: Float

Returns the sign of this value:

Since Kotlin 1.8
actual val Float.sign: Float

Returns the sign of this value:

Since Kotlin 1.8
Link copied to clipboard

Returns the ulp of this value.

Since Kotlin 1.2

Returns the ulp of this value.

Since Kotlin 1.3

Functions

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

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

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

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

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

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

Since Kotlin 1.0
Link copied to clipboard
expect operator fun compareTo(other: Byte): Int
expect operator fun compareTo(other: Double): Int
expect open operator override fun compareTo(other: Float): Int
expect operator fun compareTo(other: Int): Int
expect operator fun compareTo(other: Long): Int
expect 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
actual operator fun compareTo(other: Byte): Int
actual operator fun compareTo(other: Double): Int
actual open operator override fun compareTo(other: Float): Int
actual operator fun compareTo(other: Int): Int
actual operator fun compareTo(other: Long): Int
actual 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.1
operator fun compareTo(other: Byte): Int
operator fun compareTo(other: Double): Int
open operator override 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
actual operator fun compareTo(other: Byte): Int
actual operator fun compareTo(other: Double): Int
actual open operator override fun compareTo(other: Float): Int
actual operator fun compareTo(other: Int): Int
actual operator fun compareTo(other: Long): Int
actual 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.3
actual inline operator fun compareTo(other: Byte): Int
actual inline operator fun compareTo(other: Double): Int
actual open operator override fun compareTo(other: Float): Int
actual inline operator fun compareTo(other: Int): Int
actual inline operator fun compareTo(other: Long): Int
actual inline 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.8
actual inline operator fun compareTo(other: Byte): Int
actual inline operator fun compareTo(other: Double): Int
actual open operator override fun compareTo(other: Float): Int
actual inline operator fun compareTo(other: Int): Int
actual inline operator fun compareTo(other: Long): Int
actual inline 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.8
Link copied to clipboard
infix inline fun <T> Comparable<T>.compareTo(other: T): Int

Compares this object with the specified object for order. Returns zero if this object is equal to the specified other object, a negative number if it's less than other, or a positive number if it's greater than other.

Since Kotlin 1.6
Link copied to clipboard
expect operator fun dec(): Float

Returns this value decremented by one.

Since Kotlin 1.0
actual operator fun dec(): Float

Returns this value decremented by one.

Since Kotlin 1.1
operator fun dec(): Float

Returns this value decremented by one.

Since Kotlin 1.0
actual operator external fun dec(): Float

Returns this value decremented by one.

Since Kotlin 1.3
actual inline operator fun dec(): Float

Returns this value decremented by one.

Since Kotlin 1.8
actual inline operator fun dec(): Float

Returns this value decremented by one.

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

Divides this value by the other value.

Since Kotlin 1.0
actual operator fun div(other: Byte): Float
actual operator fun div(other: Double): Double
actual operator fun div(other: Float): Float
actual operator fun div(other: Int): Float
actual operator fun div(other: Long): Float
actual operator fun div(other: Short): Float

Divides this value by the other value.

Since Kotlin 1.1
operator fun div(other: Byte): Float
operator fun div(other: Double): Double
operator fun div(other: Float): Float
operator fun div(other: Int): Float
operator fun div(other: Long): Float
operator fun div(other: Short): Float

Divides this value by the other value.

Since Kotlin 1.0
actual inline operator fun div(other: Byte): Float
actual inline operator fun div(other: Double): Double
actual operator external fun div(other: Float): Float
actual inline operator fun div(other: Int): Float
actual inline operator fun div(other: Long): Float
actual inline operator fun div(other: Short): Float

Divides this value by the other value.

Since Kotlin 1.3
actual inline operator fun div(other: Byte): Float
actual inline operator fun div(other: Double): Double
actual operator fun div(other: Float): Float
actual inline operator fun div(other: Int): Float
actual inline operator fun div(other: Long): Float
actual inline operator fun div(other: Short): Float

Divides this value by the other value.

Since Kotlin 1.8
actual inline operator fun div(other: Byte): Float
actual inline operator fun div(other: Double): Double
actual operator fun div(other: Float): Float
actual inline operator fun div(other: Int): Float
actual inline operator fun div(other: Long): Float
actual inline operator fun div(other: Short): Float

Divides this value by the other value.

Since Kotlin 1.8
Link copied to clipboard
expect open operator override fun equals(other: Any?): Boolean
Since Kotlin 1.0
actual open operator override fun equals(other: Any?): Boolean
Since Kotlin 1.1
open operator override fun equals(other: Any?): Boolean
Since Kotlin 1.0
actual open operator override fun equals(other: Any?): Boolean
Since Kotlin 1.3
actual open operator override fun equals(other: Any?): Boolean
Since Kotlin 1.8
actual open operator override fun equals(other: Any?): Boolean
Since Kotlin 1.8
Link copied to clipboard
expect open override fun hashCode(): Int
Since Kotlin 1.0
actual open override fun hashCode(): Int
Since Kotlin 1.1
actual open override fun hashCode(): Int
Since Kotlin 1.3
actual open override fun hashCode(): Int
Since Kotlin 1.8
actual open override fun hashCode(): Int
Since Kotlin 1.8
Link copied to clipboard
inline fun Float.IEEErem(divisor: Float): Float

Computes the remainder of division of this value by the divisor value according to the IEEE 754 standard.

Since Kotlin 1.2
external fun Float.IEEErem(divisor: Float): Float

Computes the remainder of division of this value by the divisor value according to the IEEE 754 standard.

Since Kotlin 1.3
Link copied to clipboard
expect operator fun inc(): Float

Returns this value incremented by one.

Since Kotlin 1.0
actual operator fun inc(): Float

Returns this value incremented by one.

Since Kotlin 1.1
operator fun inc(): Float

Returns this value incremented by one.

Since Kotlin 1.0
actual operator external fun inc(): Float

Returns this value incremented by one.

Since Kotlin 1.3
actual inline operator fun inc(): Float

Returns this value incremented by one.

Since Kotlin 1.8
actual inline operator fun inc(): Float

Returns this value incremented by one.

Since Kotlin 1.8
Link copied to clipboard
expect fun Float.isFinite(): Boolean

Returns true if the argument is a finite floating-point value; returns false otherwise (for NaN and infinity arguments).

Since Kotlin 1.0
actual fun Float.isFinite(): Boolean

Returns true if the argument is a finite floating-point value; returns false otherwise (for NaN and infinity arguments).

Since Kotlin 1.1
actual inline fun Float.isFinite(): Boolean

Returns true if the argument is a finite floating-point value; returns false otherwise (for NaN and infinity arguments).

Since Kotlin 1.0
actual external fun Float.isFinite(): Boolean

Returns true if the argument is a finite floating-point value; returns false otherwise (for NaN and infinity arguments).

Since Kotlin 1.3
actual fun Float.isFinite(): Boolean

Returns true if the argument is a finite floating-point value; returns false otherwise (for NaN and infinity arguments).

Since Kotlin 1.8
actual fun Float.isFinite(): Boolean

Returns true if the argument is a finite floating-point value; returns false otherwise (for NaN and infinity arguments).

Since Kotlin 1.8
Link copied to clipboard
expect fun Float.isInfinite(): Boolean

Returns true if this value is infinitely large in magnitude.

Since Kotlin 1.0
actual fun Float.isInfinite(): Boolean

Returns true if this value is infinitely large in magnitude.

Since Kotlin 1.1
actual inline fun Float.isInfinite(): Boolean

Returns true if this value is infinitely large in magnitude.

Since Kotlin 1.0
actual external fun Float.isInfinite(): Boolean

Returns true if this value is infinitely large in magnitude.

Since Kotlin 1.3
actual fun Float.isInfinite(): Boolean

Returns true if this value is infinitely large in magnitude.

Since Kotlin 1.8
actual fun Float.isInfinite(): Boolean

Returns true if this value is infinitely large in magnitude.

Since Kotlin 1.8
Link copied to clipboard
expect fun Float.isNaN(): Boolean

Returns true if the specified number is a Not-a-Number (NaN) value, false otherwise.

Since Kotlin 1.0
actual fun Float.isNaN(): Boolean

Returns true if the specified number is a Not-a-Number (NaN) value, false otherwise.

Since Kotlin 1.1
actual inline fun Float.isNaN(): Boolean

Returns true if the specified number is a Not-a-Number (NaN) value, false otherwise.

Since Kotlin 1.0
actual external fun Float.isNaN(): Boolean

Returns true if the specified number is a Not-a-Number (NaN) value, false otherwise.

Since Kotlin 1.3
actual fun Float.isNaN(): Boolean

Returns true if the specified number is a Not-a-Number (NaN) value, false otherwise.

Since Kotlin 1.8
actual fun Float.isNaN(): Boolean

Returns true if the specified number is a Not-a-Number (NaN) value, false otherwise.

Since Kotlin 1.8
Link copied to clipboard
expect operator fun minus(other: Byte): Float
expect operator fun minus(other: Double): Double
expect operator fun minus(other: Float): Float
expect operator fun minus(other: Int): Float
expect operator fun minus(other: Long): Float
expect operator fun minus(other: Short): Float

Subtracts the other value from this value.

Since Kotlin 1.0
actual operator fun minus(other: Byte): Float
actual operator fun minus(other: Double): Double
actual operator fun minus(other: Float): Float
actual operator fun minus(other: Int): Float
actual operator fun minus(other: Long): Float
actual operator fun minus(other: Short): Float

Subtracts the other value from this value.

Since Kotlin 1.1
operator fun minus(other: Byte): Float
operator fun minus(other: Double): Double
operator fun minus(other: Float): Float
operator fun minus(other: Int): Float
operator fun minus(other: Long): Float
operator fun minus(other: Short): Float

Subtracts the other value from this value.

Since Kotlin 1.0
actual inline operator fun minus(other: Byte): Float
actual inline operator fun minus(other: Double): Double
actual operator external fun minus(other: Float): Float
actual inline operator fun minus(other: Int): Float
actual inline operator fun minus(other: Long): Float
actual inline operator fun minus(other: Short): Float

Subtracts the other value from this value.

Since Kotlin 1.3
actual inline operator fun minus(other: Byte): Float
actual inline operator fun minus(other: Double): Double
actual operator fun minus(other: Float): Float
actual inline operator fun minus(other: Int): Float
actual inline operator fun minus(other: Long): Float
actual inline operator fun minus(other: Short): Float

Subtracts the other value from this value.

Since Kotlin 1.8
actual inline operator fun minus(other: Byte): Float
actual inline operator fun minus(other: Double): Double
actual operator fun minus(other: Float): Float
actual inline operator fun minus(other: Int): Float
actual inline operator fun minus(other: Long): Float
actual inline operator fun minus(other: Short): Float

Subtracts the other value from this value.

Since Kotlin 1.8
Link copied to clipboard
inline fun Float.mod(other: Double): Double
inline fun Float.mod(other: Float): Float

Calculates the remainder of flooring division of this value (dividend) by the other value (divisor).

Since Kotlin 1.5
Link copied to clipboard
inline external fun <R : Number> Number.narrow(): R
Since Kotlin 1.3
Link copied to clipboard
inline fun Float.nextDown(): Float

Returns the Float value nearest to this value in direction of negative infinity.

Since Kotlin 1.2
external fun Float.nextDown(): Float

Returns the Float value nearest to this value in direction of negative infinity.

Since Kotlin 1.3
Link copied to clipboard
inline fun Float.nextTowards(to: Float): Float

Returns the Float value nearest to this value in direction from this value towards the value to.

Since Kotlin 1.2
external fun Float.nextTowards(to: Float): Float

Returns the Float value nearest to this value in direction from this value towards the value to.

Since Kotlin 1.3
Link copied to clipboard
inline fun Float.nextUp(): Float

Returns the Float value nearest to this value in direction of positive infinity.

Since Kotlin 1.2
external fun Float.nextUp(): Float

Returns the Float value nearest to this value in direction of positive infinity.

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

Adds the other value to this value.

Since Kotlin 1.0
actual operator fun plus(other: Byte): Float
actual operator fun plus(other: Double): Double
actual operator fun plus(other: Float): Float
actual operator fun plus(other: Int): Float
actual operator fun plus(other: Long): Float
actual operator fun plus(other: Short): Float

Adds the other value to this value.

Since Kotlin 1.1
operator fun plus(other: Byte): Float
operator fun plus(other: Double): Double
operator fun plus(other: Float): Float
operator fun plus(other: Int): Float
operator fun plus(other: Long): Float
operator fun plus(other: Short): Float

Adds the other value to this value.

Since Kotlin 1.0
actual inline operator fun plus(other: Byte): Float
actual inline operator fun plus(other: Double): Double
actual operator external fun plus(other: Float): Float
actual inline operator fun plus(other: Int): Float
actual inline operator fun plus(other: Long): Float
actual inline operator fun plus(other: Short): Float

Adds the other value to this value.

Since Kotlin 1.3
actual inline operator fun plus(other: Byte): Float
actual inline operator fun plus(other: Double): Double
actual operator fun plus(other: Float): Float
actual inline operator fun plus(other: Int): Float
actual inline operator fun plus(other: Long): Float
actual inline operator fun plus(other: Short): Float

Adds the other value to this value.

Since Kotlin 1.8
actual inline operator fun plus(other: Byte): Float
actual inline operator fun plus(other: Double): Double
actual operator fun plus(other: Float): Float
actual inline operator fun plus(other: Int): Float
actual inline operator fun plus(other: Long): Float
actual inline operator fun plus(other: Short): Float

Adds the other value to this value.

Since Kotlin 1.8
Link copied to clipboard
expect fun Float.pow(x: Float): Float

Raises this value to the power x.

Since Kotlin 1.2
expect fun Float.pow(n: Int): Float

Raises this value to the integer power n.

Since Kotlin 1.2
actual inline fun Float.pow(x: Float): Float

Raises this value to the power x.

Since Kotlin 1.2
actual inline fun Float.pow(n: Int): Float

Raises this value to the integer power n.

Since Kotlin 1.2
actual inline fun Float.pow(x: Float): Float

Raises this value to the power x.

Since Kotlin 1.2
actual inline fun Float.pow(n: Int): Float

Raises this value to the integer power n.

Since Kotlin 1.2
actual external fun Float.pow(x: Float): Float

Raises this value to the power x.

Since Kotlin 1.3
actual fun Float.pow(n: Int): Float

Raises this value to the integer power n.

Since Kotlin 1.3
actual fun Float.pow(x: Float): Float

Raises this value to the power x.

Since Kotlin 1.8
actual fun Float.pow(n: Int): Float

Raises this value to the integer power n.

Since Kotlin 1.8
actual fun Float.pow(x: Float): Float

Raises this value to the power x.

Since Kotlin 1.8
actual fun Float.pow(n: Int): Float

Raises this value to the integer power n.

Since Kotlin 1.8
Link copied to clipboard

Creates a range from this Float value to the specified that value.

Since Kotlin 1.1
Link copied to clipboard
operator fun Float.rangeUntil(that: Float): OpenEndRange<Float>

Creates an open-ended range from this Float value to the specified that value.

Since Kotlin 1.9
Link copied to clipboard
expect operator fun rem(other: Byte): Float
expect operator fun rem(other: Double): Double
expect operator fun rem(other: Float): Float
expect operator fun rem(other: Int): Float
expect operator fun rem(other: Long): Float
expect operator fun rem(other: Short): Float

Calculates the remainder of truncating division of this value (dividend) by the other value (divisor).

Since Kotlin 1.1
actual operator fun rem(other: Byte): Float
actual operator fun rem(other: Double): Double
actual operator fun rem(other: Float): Float
actual operator fun rem(other: Int): Float
actual operator fun rem(other: Long): Float
actual operator fun rem(other: Short): Float

Calculates the remainder of truncating division of this value (dividend) by the other value (divisor).

Since Kotlin 1.1
operator fun rem(other: Byte): Float
operator fun rem(other: Double): Double
operator fun rem(other: Float): Float
operator fun rem(other: Int): Float
operator fun rem(other: Long): Float
operator fun rem(other: Short): Float

Calculates the remainder of truncating division of this value (dividend) by the other value (divisor).

Since Kotlin 1.1
actual inline operator fun rem(other: Byte): Float
actual inline operator fun rem(other: Double): Double
actual operator external fun rem(other: Float): Float
actual inline operator fun rem(other: Int): Float
actual inline operator fun rem(other: Long): Float
actual inline operator fun rem(other: Short): Float

Calculates the remainder of truncating division of this value (dividend) by the other value (divisor).

Since Kotlin 1.3
actual inline operator fun rem(other: Byte): Float
actual inline operator fun rem(other: Double): Double
actual operator fun rem(other: Float): Float
actual inline operator fun rem(other: Int): Float
actual inline operator fun rem(other: Long): Float
actual inline operator fun rem(other: Short): Float

Calculates the remainder of truncating division of this value (dividend) by the other value (divisor).

Since Kotlin 1.8
actual inline operator fun rem(other: Byte): Float
actual inline operator fun rem(other: Double): Double
actual operator fun rem(other: Float): Float
actual inline operator fun rem(other: Int): Float
actual inline operator fun rem(other: Long): Float
actual inline operator fun rem(other: Short): Float

Calculates the remainder of truncating division of this value (dividend) by the other value (divisor).

Since Kotlin 1.8
Link copied to clipboard
expect fun Float.roundToInt(): Int

Rounds this Float value to the nearest integer and converts the result to Int. Ties are rounded towards positive infinity.

Since Kotlin 1.2
actual inline fun Float.roundToInt(): Int

Rounds this Float value to the nearest integer and converts the result to Int. Ties are rounded towards positive infinity.

Since Kotlin 1.2
actual fun Float.roundToInt(): Int

Rounds this Float value to the nearest integer and converts the result to Int. Ties are rounded towards positive infinity.

Since Kotlin 1.2
actual fun Float.roundToInt(): Int

Rounds this Float value to the nearest integer and converts the result to Int. Ties are rounded towards positive infinity.

Since Kotlin 1.3
actual fun Float.roundToInt(): Int

Rounds this Float value to the nearest integer and converts the result to Int. Ties are rounded towards positive infinity.

Since Kotlin 1.8
actual fun Float.roundToInt(): Int

Rounds this Float value to the nearest integer and converts the result to Int. Ties are rounded towards positive infinity.

Since Kotlin 1.8
Link copied to clipboard
expect fun Float.roundToLong(): Long

Rounds this Float value to the nearest integer and converts the result to Long. Ties are rounded towards positive infinity.

Since Kotlin 1.2
actual inline fun Float.roundToLong(): Long

Rounds this Float value to the nearest integer and converts the result to Long. Ties are rounded towards positive infinity.

Since Kotlin 1.2
actual fun Float.roundToLong(): Long

Rounds this Float value to the nearest integer and converts the result to Long. Ties are rounded towards positive infinity.

Since Kotlin 1.2
actual fun Float.roundToLong(): Long

Rounds this Float value to the nearest integer and converts the result to Long. Ties are rounded towards positive infinity.

Since Kotlin 1.3
actual fun Float.roundToLong(): Long

Rounds this Float value to the nearest integer and converts the result to Long. Ties are rounded towards positive infinity.

Since Kotlin 1.8
actual fun Float.roundToLong(): Long

Rounds this Float value to the nearest integer and converts the result to Long. Ties are rounded towards positive infinity.

Since Kotlin 1.8
Link copied to clipboard
inline external fun <R : Number> Number.signExtend(): R
Since Kotlin 1.3
Link copied to clipboard
expect operator fun times(other: Byte): Float
expect operator fun times(other: Double): Double
expect operator fun times(other: Float): Float
expect operator fun times(other: Int): Float
expect operator fun times(other: Long): Float
expect operator fun times(other: Short): Float

Multiplies this value by the other value.

Since Kotlin 1.0
actual operator fun times(other: Byte): Float
actual operator fun times(other: Double): Double
actual operator fun times(other: Float): Float
actual operator fun times(other: Int): Float
actual operator fun times(other: Long): Float
actual operator fun times(other: Short): Float

Multiplies this value by the other value.

Since Kotlin 1.1
operator fun times(other: Byte): Float
operator fun times(other: Double): Double
operator fun times(other: Float): Float
operator fun times(other: Int): Float
operator fun times(other: Long): Float
operator fun times(other: Short): Float

Multiplies this value by the other value.

Since Kotlin 1.0
actual inline operator fun times(other: Byte): Float
actual inline operator fun times(other: Double): Double
actual operator external fun times(other: Float): Float
actual inline operator fun times(other: Int): Float
actual inline operator fun times(other: Long): Float
actual inline operator fun times(other: Short): Float

Multiplies this value by the other value.

Since Kotlin 1.3
actual inline operator fun times(other: Byte): Float
actual inline operator fun times(other: Double): Double
actual operator fun times(other: Float): Float
actual inline operator fun times(other: Int): Float
actual inline operator fun times(other: Long): Float
actual inline operator fun times(other: Short): Float

Multiplies this value by the other value.

Since Kotlin 1.8
actual inline operator fun times(other: Byte): Float
actual inline operator fun times(other: Double): Double
actual operator fun times(other: Float): Float
actual inline operator fun times(other: Int): Float
actual inline operator fun times(other: Long): Float
actual inline operator fun times(other: Short): Float

Multiplies this value by the other value.

Since Kotlin 1.8
Link copied to clipboard
inline fun Float.toBigDecimal(mathContext: MathContext): BigDecimal

Returns the value of this Float number as a BigDecimal.

Since Kotlin 1.2
Link copied to clipboard
expect fun Float.toBits(): Int

Returns a bit representation of the specified floating-point value as Int according to the IEEE 754 floating-point "single format" bit layout.

Since Kotlin 1.2
actual fun Float.toBits(): Int

Returns a bit representation of the specified floating-point value as Int according to the IEEE 754 floating-point "single format" bit layout.

Since Kotlin 1.2
actual inline fun Float.toBits(): Int

Returns a bit representation of the specified floating-point value as Int according to the IEEE 754 floating-point "single format" bit layout.

Since Kotlin 1.2
actual inline fun Float.toBits(): Int

Returns a bit representation of the specified floating-point value as Int according to the IEEE 754 floating-point "single format" bit layout.

Since Kotlin 1.3
actual fun Float.toBits(): Int

Returns a bit representation of the specified floating-point value as Int according to the IEEE 754 floating-point "single format" bit layout.

Since Kotlin 1.8
actual fun Float.toBits(): Int

Returns a bit representation of the specified floating-point value as Int according to the IEEE 754 floating-point "single format" bit layout.

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

Converts this Float value to Byte.

Since Kotlin 1.0
actual open override fun toByte(): Byte

Converts this Float value to Byte.

Since Kotlin 1.1
open override fun toByte(): Byte

Converts this Float value to Byte.

Since Kotlin 1.0
actual open override fun toByte(): Byte

Converts this Float value to Byte.

Since Kotlin 1.3
actual open inline override fun toByte(): Byte

Converts this Float value to Byte.

Since Kotlin 1.8
actual open inline override fun toByte(): Byte

Converts this Float value to Byte.

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

Converts this Float value to Char.

Since Kotlin 1.0
actual open override fun toChar(): Char

Converts this Float value to Char.

Since Kotlin 1.1
open override fun toChar(): Char

Converts this Float value to Char.

Since Kotlin 1.0
actual open override fun toChar(): Char

Converts this Float value to Char.

Since Kotlin 1.3
actual open inline override fun toChar(): Char

Converts this Float value to Char.

Since Kotlin 1.8
actual open inline override fun toChar(): Char

Converts this Float value to Char.

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

Converts this Float value to Double.

Since Kotlin 1.0
actual open override fun toDouble(): Double

Converts this Float value to Double.

Since Kotlin 1.1
open override fun toDouble(): Double

Converts this Float value to Double.

Since Kotlin 1.0
actual open external override fun toDouble(): Double

Converts this Float value to Double.

Since Kotlin 1.3
actual open override fun toDouble(): Double

Converts this Float value to Double.

Since Kotlin 1.8
actual open override fun toDouble(): Double

Converts this Float value to Double.

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

Returns this value.

Since Kotlin 1.0
actual open override fun toFloat(): Float

Returns this value.

Since Kotlin 1.1
open override fun toFloat(): Float

Returns this value.

Since Kotlin 1.0
actual open inline override fun toFloat(): Float

Returns this value.

Since Kotlin 1.3
actual open inline override fun toFloat(): Float

Returns this value.

Since Kotlin 1.8
actual open inline override fun toFloat(): Float

Returns this value.

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

Converts this Float value to Int.

Since Kotlin 1.0
actual open override fun toInt(): Int

Converts this Float value to Int.

Since Kotlin 1.1
open override fun toInt(): Int

Converts this Float value to Int.

Since Kotlin 1.0
actual open external override fun toInt(): Int

Converts this Float value to Int.

Since Kotlin 1.3
actual open override fun toInt(): Int

Converts this Float value to Int.

Since Kotlin 1.8
actual open override fun toInt(): Int

Converts this Float value to Int.

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

Converts this Float value to Long.

Since Kotlin 1.0
actual open override fun toLong(): Long

Converts this Float value to Long.

Since Kotlin 1.1
open override fun toLong(): Long

Converts this Float value to Long.

Since Kotlin 1.0
actual open external override fun toLong(): Long

Converts this Float value to Long.

Since Kotlin 1.3
actual open override fun toLong(): Long

Converts this Float value to Long.

Since Kotlin 1.8
actual open override fun toLong(): Long

Converts this Float value to Long.

Since Kotlin 1.8
Link copied to clipboard
expect fun Float.toRawBits(): Int

Returns a bit representation of the specified floating-point value as Int according to the IEEE 754 floating-point "single format" bit layout, preserving NaN values exact layout.

Since Kotlin 1.2
actual fun Float.toRawBits(): Int

Returns a bit representation of the specified floating-point value as Int according to the IEEE 754 floating-point "single format" bit layout, preserving NaN values exact layout.

Since Kotlin 1.2
actual inline fun Float.toRawBits(): Int

Returns a bit representation of the specified floating-point value as Int according to the IEEE 754 floating-point "single format" bit layout, preserving NaN values exact layout.

Since Kotlin 1.2
actual inline fun Float.toRawBits(): Int

Returns a bit representation of the specified floating-point value as Int according to the IEEE 754 floating-point "single format" bit layout, preserving NaN values exact layout.

Since Kotlin 1.3
actual fun Float.toRawBits(): Int

Returns a bit representation of the specified floating-point value as Int according to the IEEE 754 floating-point "single format" bit layout, preserving NaN values exact layout.

Since Kotlin 1.8
actual fun Float.toRawBits(): Int

Returns a bit representation of the specified floating-point value as Int according to the IEEE 754 floating-point "single format" bit layout, preserving NaN values exact layout.

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

Converts this Float value to Short.

Since Kotlin 1.0
actual open override fun toShort(): Short

Converts this Float value to Short.

Since Kotlin 1.1
open override fun toShort(): Short

Converts this Float value to Short.

Since Kotlin 1.0
actual open override fun toShort(): Short

Converts this Float value to Short.

Since Kotlin 1.3
actual open inline override fun toShort(): Short

Converts this Float value to Short.

Since Kotlin 1.8
actual open inline override fun toShort(): Short

Converts this Float value to Short.

Since Kotlin 1.8
Link copied to clipboard
expect open override fun toString(): String
Since Kotlin 1.0
actual open override fun toString(): String
Since Kotlin 1.1
open override fun toString(): String
Since Kotlin 1.0
actual open override fun toString(): String

Returns the string representation of this Float value.

Since Kotlin 1.3
actual open override fun toString(): String
Since Kotlin 1.8
actual open override fun toString(): String
Since Kotlin 1.8
Link copied to clipboard
inline fun Float.toUInt(): UInt

Converts this Float value to UInt.

Since Kotlin 1.5
Link copied to clipboard
inline fun Float.toULong(): ULong

Converts this Float value to ULong.

Since Kotlin 1.5
Link copied to clipboard
expect operator fun unaryMinus(): Float

Returns the negative of this value.

Since Kotlin 1.0
actual operator fun unaryMinus(): Float

Returns the negative of this value.

Since Kotlin 1.1
operator fun unaryMinus(): Float

Returns the negative of this value.

Since Kotlin 1.0
actual operator external fun unaryMinus(): Float

Returns the negative of this value.

Since Kotlin 1.3
actual operator fun unaryMinus(): Float

Returns the negative of this value.

Since Kotlin 1.8
actual operator fun unaryMinus(): Float

Returns the negative of this value.

Since Kotlin 1.8
Link copied to clipboard
expect operator fun unaryPlus(): Float

Returns this value.

Since Kotlin 1.0
actual operator fun unaryPlus(): Float

Returns this value.

Since Kotlin 1.1
operator fun unaryPlus(): Float

Returns this value.

Since Kotlin 1.0
actual operator external fun unaryPlus(): Float

Returns this value.

Since Kotlin 1.3
actual inline operator fun unaryPlus(): Float

Returns this value.

Since Kotlin 1.8
actual inline operator fun unaryPlus(): Float

Returns this value.

Since Kotlin 1.8
Link copied to clipboard
expect fun Float.withSign(sign: Float): Float
expect fun Float.withSign(sign: Int): Float

Returns this value with the sign bit same as of the sign value.

Since Kotlin 1.2
actual inline fun Float.withSign(sign: Float): Float
actual inline fun Float.withSign(sign: Int): Float

Returns this value with the sign bit same as of the sign value.

Since Kotlin 1.2
actual inline fun Float.withSign(sign: Float): Float
actual inline fun Float.withSign(sign: Int): Float

Returns this value with the sign bit same as of the sign value.

Since Kotlin 1.2
actual external fun Float.withSign(sign: Float): Float
actual fun Float.withSign(sign: Int): Float

Returns this value with the sign bit same as of the sign value.

Since Kotlin 1.3
actual fun Float.withSign(sign: Float): Float
actual fun Float.withSign(sign: Int): Float

Returns this value with the sign bit same as of the sign value.

Since Kotlin 1.8
actual fun Float.withSign(sign: Float): Float
actual fun Float.withSign(sign: Int): Float

Returns this value with the sign bit same as of the sign value.

Since Kotlin 1.8