absoluteValue

Common
Native
1.2
val Double.absoluteValue: Double
JVM
JS
1.2
inline val Double.absoluteValue: Double
Common
Native
1.2
val Float.absoluteValue: Float
JVM
JS
1.2
inline val Float.absoluteValue: Float

Returns the absolute value of this value.

Special cases:

  • NaN.absoluteValue is NaN

See Also

abs

Common
Native
1.2
val Int.absoluteValue: Int
JVM
JS
1.2
inline val Int.absoluteValue: Int

Returns the absolute value of this value.

Special cases:

  • Int.MIN_VALUE.absoluteValue is Int.MIN_VALUE due to an overflow

See Also

abs

Common
Native
1.2
val Long.absoluteValue: Long
JVM
JS
1.2
inline val Long.absoluteValue: Long

Returns the absolute value of this value.

Special cases:

  • Long.MIN_VALUE.absoluteValue is Long.MIN_VALUE due to an overflow

See Also

abs