code: function expandXBounds(bounds, value) {
    if (bounds[MIN_X] > value) bounds[MIN_X] = value;else if (bounds[MAX_X] < value) bounds[MAX_X] = value;
  }
docs: expand the x-bounds, if the value lies outside the bounding box