abs

@JvmName(name = "absInt")
fun IntArray.abs(): IntArray

Returns the absolute value of the given value Array.

Example:

arrayOf(-1, 2, 0, -6).abs() // [1, 2, 0, 6]

Since

1.1.0

See also

abs

@JvmName(name = "absFloat")
fun FloatArray.abs(): FloatArray

Returns the absolute value of the given value Array.

Example:

arrayOf(-1F, 2F, 0F, -6F).abs() // [1F, 2F, 0F, 6F]

Since

1.1.0

See also

abs

@JvmName(name = "absDouble")
fun DoubleArray.abs(): DoubleArray

Returns the absolute value of the given value Array.

Example:

arrayOf(-1.0, 2.0, 0.0, -6.0).abs() // [1.0, 2.0, 0.0, 6.0]

Since

1.1.0

See also

abs

@JvmName(name = "absLong")
fun LongArray.abs(): LongArray

Returns the absolute value of the given value Array.

Example:

arrayOf(-1L, 2L, 0L, -6L).abs() // [1L, 2L, 0L, 6L]

Since

1.1.0

See also

abs

@JvmName(name = "absInt")
fun Iterable<Int>.abs(): Iterable<Int>

Returns the absolute value of the given value Iterable.

Example:

listOf(-1, 2, 0, -6).abs() // [1, 2, 0, 6]

Since

1.1.0

See also

abs

@JvmName(name = "absFloat")
fun Iterable<Float>.abs(): Iterable<Float>

Returns the absolute value of the given value Iterable.

Example:

listOf(-1F, 2F, 0F, -6F).abs() // [1F, 2F, 0F, 6F]

Since

1.1.0

See also

abs

@JvmName(name = "absDouble")
fun Iterable<Double>.abs(): Iterable<Double>

Returns the absolute value of the given value Iterable.

Example:

listOf(-1.0, 2.0, 0.0, -6.0).abs() // [1.0, 2.0, 0.0, 6.0]

Since

1.1.0

See also

abs

@JvmName(name = "absLong")
fun Iterable<Long>.abs(): Iterable<Long>

Returns the absolute value of the given value Iterable.

Example:

listOf(-1L, 2L, 0L, -6L).abs() // [1L, 2L, 0L, 6L]

Since

1.1.0

See also

abs