DLiteScript

math.abs

Returns the absolute value of a number.

Examples

1
2
printf("%g\n", math.abs(-5)) // 5
printf("%g\n", math.abs(5))  // 5