dist [MTL Home] Programmers Guide
  Contents | Index |  Search 


Category:intervals,math Component type:function
Prototype
template <class Tnum>
Tnum dist(const interval<Tnum>& a, const interval<Tnum>& b) ;
Description
Returns the minimal distance between bounds of two intervals. The diference between the two closest bounds (upper or lower) of two intervals. Returns the absolute value of the difference between the lower bounds of the intervals a and b or the absolute value of the difference between the upper bounds of the intervals, whichever is lower.
Definition
interval.cct
Preconditions
Complexity
Example
In intersection.h:

Notes
See also

[MTL Home] Copyright © 1998,1999 University of Notre Dame. All Rights Reserved.