Why not something as simple as `return (a - b)` ?
It’s concise and simple to understand. Instead of returning 1 or -1 it returns a positive or negative value with I think is equally effective.
It’s concise and simple to understand. Instead of returning 1 or -1 it returns a positive or negative value with I think is equally effective.
That will overflow if a & b are longs.