Number

abstract class Number

Superclass for all platform classes representing numeric values.

abstract class Number

Superclass for all platform classes representing numeric values.

abstract class Number

Superclass for all platform classes representing numeric values.

Constructors

Link copied to clipboard
fun Number()
fun Number()
fun Number()

Functions

Link copied to clipboard
abstract fun toByte(): Byte

Returns the value of this number as a Byte, which may involve rounding or truncation.

abstract fun toByte(): Byte

Returns the value of this number as a Byte, which may involve rounding or truncation.

abstract fun toByte(): Byte

Returns the value of this number as a Byte, which may involve rounding or truncation.

Link copied to clipboard
abstract fun toChar(): Char

Returns the Char with the numeric value equal to this number, truncated to 16 bits if appropriate.

abstract fun toChar(): Char

Returns the Char with the numeric value equal to this number, truncated to 16 bits if appropriate.

abstract fun toChar(): Char

Returns the Char with the numeric value equal to this number, truncated to 16 bits if appropriate.

Link copied to clipboard
abstract fun toDouble(): Double

Returns the value of this number as a Double, which may involve rounding.

abstract fun toDouble(): Double

Returns the value of this number as a Double, which may involve rounding.

abstract fun toDouble(): Double

Returns the value of this number as a Double, which may involve rounding.

Link copied to clipboard
abstract fun toFloat(): Float

Returns the value of this number as a Float, which may involve rounding.

abstract fun toFloat(): Float

Returns the value of this number as a Float, which may involve rounding.

abstract fun toFloat(): Float

Returns the value of this number as a Float, which may involve rounding.

Link copied to clipboard
abstract fun toInt(): Int

Returns the value of this number as an Int, which may involve rounding or truncation.

abstract fun toInt(): Int

Returns the value of this number as an Int, which may involve rounding or truncation.

abstract fun toInt(): Int

Returns the value of this number as an Int, which may involve rounding or truncation.

Link copied to clipboard
abstract fun toLong(): Long

Returns the value of this number as a Long, which may involve rounding or truncation.

abstract fun toLong(): Long

Returns the value of this number as a Long, which may involve rounding or truncation.

abstract fun toLong(): Long

Returns the value of this number as a Long, which may involve rounding or truncation.

Link copied to clipboard
abstract fun toShort(): Short

Returns the value of this number as a Short, which may involve rounding or truncation.

abstract fun toShort(): Short

Returns the value of this number as a Short, which may involve rounding or truncation.

abstract fun toShort(): Short

Returns the value of this number as a Short, which may involve rounding or truncation.

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Extensions

Link copied to clipboard
inline external fun <R : Number> Number.narrow(): R
inline external fun <R : Number> Number.narrow(): R
inline external fun <R : Number> Number.narrow(): R
Link copied to clipboard
inline external fun <R : Number> Number.signExtend(): R
inline external fun <R : Number> Number.signExtend(): R
inline external fun <R : Number> Number.signExtend(): R