Returns the sign of a number.
Example:
print(sign(-15)); // Output: -1
int sign(num x) { return x < 0 ? -1 : (x > 0 ? 1 : 0); }