function compareComplexNumbers(x, y) {
  if (x.re > y.re) {
    return 1;
  }

  if (x.re < y.re) {
    return -1;
  }

  if (x.im > y.im) {
    return 1;
  }

  if (x.im < y.im) {
    return -1;
  }

  return 0;
}
Compare two complex numbers, `x` and `y`:

- First, compare the real values of `x` and `y`
- If equal, compare the imaginary values of `x` and `y`

@params {Complex} x
@params {Complex} y
@returns {number} Returns the comparison result: -1, 0, or 1