]> git.donarmstrong.com Git - lilypond.git/blobdiff - boxes.cc
release: 0.0.5
[lilypond.git] / boxes.cc
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;
 }
+