abs - Absolute value
int32 abs(int32 num);
fix32 abs(fix32 num);
Returns the absolute value of num.
The absolute value of num. If the argument number is of type fix32, the return type is also fix32, otherwise it is integer.
init { printf("%.1f", abs(-4.2)); // 4.2 (fix32) printf("%d", abs(5)); // 5 (integer) printf("%d", abs(-5)); // 5 (integer) }