cmp

int cmp(num a, num b)

num - any numeric type (int or fixed)

Description

Compares two numbers and returns the result:

1 – a is greater than b

0 – a is equal to b

-1 – a is less than b

Examples

cmp(1, 2) -> -1
cmp(1, 1) -> 0
cmp(2, 1) -> 1