Functions operating on numbers¶
The following functions supplement the built-in operators on numbers, like +
, *
, -
, /
.
Int::toString : Int -> String
¶
Converts an Int
to a String
.
Examples¶
val a = Int::toString 4
// = "4"
Math::abs : Int -> Int
¶
Get the absolute value of an Int
.
Examples¶
val a = Math::abs (10 - 15)
// = 5
val b = Math::abs 8
// = 8
Math::fabs : Float -> Float
¶
Get the absolute value of a Float
.
Examples¶
val a = Math::fabs (10.0 - 15.0)
// = 5.0
val b = Math::fabs 8.0
// = 8.0