Skip to content

v2.3.0 Interval Types Now Meaningful

Compare
Choose a tag to compare
@5cript 5cript released this 02 Aug 18:01
· 12 commits to master since this release
ba04ef5

Previously the library only really dealt with closed intervals.

This update gives the following interval types:

  • closed [a, b]
  • open (a, b)
  • left_open (a, b]
  • right_open [a, b)
  • closed_adjacent [a, b] (like closed but counts adjacent intervals as overlapping)
  • dynamic (any of the above, slower because its more logic heavy.)

closed is still the default.

interval.size() now returns the amount of elements in the interval when the interval is integral. Used to always return high - low.
This might be a breaking change in your code, but version counts it as a bugfix.