abs

expect fun abs(x: Double): Double(source)

Returns the absolute value of the given value x.

Special cases:

  • abs(NaN) is NaN

Since Kotlin

1.2

See also

extension property for Double


expect fun abs(x: Float): Float(source)

Returns the absolute value of the given value x.

Special cases:

  • abs(NaN) is NaN

Since Kotlin

1.2

See also

extension property for Float


expect fun abs(n: Int): Int(source)

Returns the absolute value of the given value n.

Special cases:

  • abs(Int.MIN_VALUE) is Int.MIN_VALUE due to an overflow

Since Kotlin

1.2

See also

extension property for Int


expect fun abs(n: Long): Long(source)

Returns the absolute value of the given value n.

Special cases:

  • abs(Long.MIN_VALUE) is Long.MIN_VALUE due to an overflow

Since Kotlin

1.2

See also

extension property for Long

actual inline fun abs(x: Double): Double(source)

Returns the absolute value of the given value x.

Special cases:

  • abs(NaN) is NaN

Since Kotlin

1.2

See also

extension property for Double


actual inline fun abs(x: Float): Float(source)

Returns the absolute value of the given value x.

Special cases:

  • abs(NaN) is NaN

Since Kotlin

1.2

See also

extension property for Float


actual fun abs(n: Int): Int(source)

Returns the absolute value of the given value n.

Special cases:

  • abs(Int.MIN_VALUE) is Int.MIN_VALUE due to an overflow

Since Kotlin

1.2

See also

extension property for Int


actual fun abs(n: Long): Long(source)

Returns the absolute value of the given value n.

Special cases:

  • abs(Long.MIN_VALUE) is Long.MIN_VALUE due to an overflow

Since Kotlin

1.2

See also

extension property for Long

actual inline fun abs(x: Double): Double(source)

Returns the absolute value of the given value x.

Special cases:

  • abs(NaN) is NaN

Since Kotlin

1.2

See also

extension property for Double


actual inline fun abs(x: Float): Float(source)

Returns the absolute value of the given value x.

Special cases:

  • abs(NaN) is NaN

Since Kotlin

1.2

See also

extension property for Float


actual inline fun abs(n: Int): Int(source)

Returns the absolute value of the given value n.

Special cases:

  • abs(Int.MIN_VALUE) is Int.MIN_VALUE due to an overflow

Since Kotlin

1.2

See also

extension property for Int


actual inline fun abs(n: Long): Long(source)

Returns the absolute value of the given value n.

Special cases:

  • abs(Long.MIN_VALUE) is Long.MIN_VALUE due to an overflow

Since Kotlin

1.2

See also

extension property for Long

actual external fun abs(x: Double): Double(source)

Returns the absolute value of the given value x.

Special cases:

  • abs(NaN) is NaN

Since Kotlin

1.3

See also

extension property for Double


actual external fun abs(x: Float): Float(source)

Returns the absolute value of the given value x.

Special cases:

  • abs(NaN) is NaN

Since Kotlin

1.3

See also

extension property for Float


actual external fun abs(n: Int): Int(source)

Returns the absolute value of the given value n.

Special cases:

  • abs(Int.MIN_VALUE) is Int.MIN_VALUE due to an overflow

Since Kotlin

1.3

See also

extension property for Int


actual external fun abs(n: Long): Long(source)

Returns the absolute value of the given value n.

Special cases:

  • abs(Long.MIN_VALUE) is Long.MIN_VALUE due to an overflow

Since Kotlin

1.3

See also

extension property for Long