Returns true if x is monotonic.
array of numbers.
1 if monotonic increasing, -1 if monotonic decreasing, 0 if not monotonic.
Returns true if x is monotonic.