abs
Returns the absolute value of the given value x.
expect fun abs(x: Double): Double(source)
import kotlin.math.abs
fun main() {
val value = -12.7
println("The absolute value of $value is ${abs(value)}")
}
Returns the absolute value of the given value x.
expect fun abs(x: Double): Double(source)
import kotlin.math.abs
fun main() {
val value = -12.7
println("The absolute value of $value is ${abs(value)}")
}