]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.5
authorfred <fred>
Thu, 24 Oct 1996 23:46:32 +0000 (23:46 +0000)
committerfred <fred>
Thu, 24 Oct 1996 23:46:32 +0000 (23:46 +0000)
boxes.cc
boxes.hh

index 74475b453053f168518107b7e3f22c4defc35fc0..ebfc08abfe02c7861e90e4bea5b40567339752e2 100644 (file)
--- a/boxes.cc
+++ b/boxes.cc
@@ -2,11 +2,14 @@
 #include "const.hh"
 
 void
-Interval:: set_empty() {
-       min = INFTY;
-       max = -INFTY;
+Interval::set_empty() {
+    min = INFTY;
+    max = -INFTY;
+}
+Real
+Interval::length() const {
+    return max-min;
 }
-
 Box::Box(svec<Real> s)
 {
     assert(s.sz() == 4);
@@ -22,6 +25,7 @@ Box::Box()
 
 Box::Box(Interval ix, Interval iy)
 {
-    x=ix;
+    x = ix;
     y = iy;
 }
+
index c9ff3e62efa952b215c98acdee2af1a8af9f10da..5d0be85452fdaf7a0ca9a7fbadecd05876f9cdb6 100644 (file)
--- a/boxes.hh
+++ b/boxes.hh
@@ -49,7 +49,7 @@ struct Interval {
        if (h.max>max)
            max = h.max;
     }
-    
+    Real length() const;
     void set_empty() ;
     bool empty() { return min > max; }
     Interval() {