Skip to content

Interval_t<T> maintenance and testing

Dan Eble requested to merge dev/eble/interval-maint into master
  • length() no longer requires the data type (T) to be implicitly convertible from an int.
  • Add left() and right() methods for unchecked access to the endpoints.
  • Add longest() for one-step creation of an interval of maximum extent.
  • Add to_string (Interval_t).
  • Add some unit tests. They are far from complete.

In a separate commit, one functional change:

  • length () now returns NaN instead of 0 for intervals (-infinity, -infinity) and (infinity, infinity).

Merge request reports