public FieldRange intersect(FieldRange range) {
		FieldLocation maxStart = start.compareTo(range.start) >= 0 ? start : range.start;
		FieldLocation minEnd = end.compareTo(range.end) <= 0 ? end : range.end;
		if (maxStart.compareTo(minEnd) >= 0) {
			return null;
		}
		return new FieldRange(maxStart, minEnd);
	}
checks if the given location is contained in the range.
@param loc the field location.
@return true if the field range contains the specified location.
Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/support/FieldRange.java