]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/interval.hh
release: 0.0.11
[lilypond.git] / flower / interval.hh
index 950945ca873216dd4b0c4e75b3a6c7a6222304bc..6f9fa63f672b6856ca6179a597a63de575b5fbc4 100644 (file)
@@ -8,6 +8,7 @@
 #define INTERVAL_HH
 
 #include <assert.h> 
+#include "fproto.hh"
 #include "real.hh"
 
 
@@ -29,15 +30,12 @@ struct Interval {
            return 0.0;
                
     }
-    void unite(Interval h) {
-       if (h.min<min)
-           min = h.min;
-       if (h.max>max)
-           max = h.max;
-    }
+    void unite(Interval h) ;
+    void intersect(Interval h);
+
     Real length() const;
     void set_empty() ;
-    bool empty() { return min > max; }
+    bool empty() const { return min > max; }
     Interval() {
        set_empty();
     }
@@ -50,9 +48,13 @@ struct Interval {
        max +=r;
        return *this;
     }
+
+    operator String() const;
 };
 
 
+Interval intersection(Interval, Interval const&);
+
 #endif // INTERVAL_HH