abs
<math>
function
[defunc [abs [number x]] -> number]
fn abs(x: number): number {}
fn abs(x: number): number {}
The abs
function returns the absolute value of the argument. The argument can be any valid number
type, the return value will be of the same type.
Examples
[include "std:math"]
[math::abs -5] // => 5
[math::abs 5] // => 5