absoluteValue

Returns the absolute value of this value.

expect val Double.absoluteValue: Double(source)
fun main() {
    val negative = -42.7
    val positive = negative.absoluteValue
    println("Absolute value of $negative is $positive")
}

Source