compareX function

int compareX(
  1. dynamic a,
  2. dynamic b
)

Implementation

int compareX(a, b) {
  if (a.x == b.x) {
    return 0;
  } else if (a.x > b.x) {
    return 1;
  } else {
    return -1;
  }
  // return a.x - b.x;
}