ixfx
    Preparing search index...

    Function compareByX

    • Compares points based on x value. Y value is ignored.

      Return values:

      • 0: If a.x === b.x
      • 1: a is to the right of b (ie. a.x > b.x)
      • -1: a is to the left of b (ie. a.x < b.x)

      Parameters

      Returns number

      arrayOfPoints.sort(Points.compareByX);