overlaps method

bool overlaps(
  1. QuantityRange<Q> range2
)

Returns true if this range overlaps range2 (exclusive of the endpoints).

Implementation

bool overlaps(QuantityRange<Q> range2) {
  if (range2.minValue <= minValue) {
    return range2.maxValue > minValue;
  } else {
    return range2.minValue < maxValue;
  }
}