2 interval.hh -- part of flowerlib
4 (c) 1996 Han-Wen Nienhuys
21 Real center() { return (min + max) /2;}
22 void translate(Real t) {
26 Real operator[](int j) {
36 void unite(Interval h) ;
39 *this and h are comparable
41 void intersect(Interval h);
45 bool empty() const { return min > max; }
49 Interval(Real m, Real M) {
53 Interval &operator += (Real r) {
62 static compare(const Interval&,Interval const&);
64 inclusion ordering. Crash if not comparable.
68 this represents the closed interval [min,max].
72 Interval intersection(Interval, Interval const&);
76 instantiate_compare(Interval&, Interval::compare);
80 Interval operator +(double a,Interval i )
87 Interval operator +(Interval i,double a ){