]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.32
authorfred <fred>
Sun, 24 Mar 2002 19:32:03 +0000 (19:32 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:32:03 +0000 (19:32 +0000)
hdr/misc.hh
src/misc.cc

index ae288151a27fab8165f7d386703f542b2ddfb464..00b742076e3cb1c6fab555d5a47f468a27654c10 100644 (file)
@@ -5,10 +5,9 @@
 #include "real.hh"
 #include "moment.hh"
 #include "scalar.hh"
+#include "grouping.hh"
 
 Moment wholes(int dur, int dots);
-
-Rhythmic_grouping parse_grouping(const Array<Scalar> &a);    
 double log_2(double x) ;
 int intlog2(int d);
 inline int
@@ -22,5 +21,6 @@ sign(int i) {
     else return 0;
 }
 
+Interval itemlist_width(const Array<Item*> &its);
 
 #endif
index a8fe2c026dc16f09ba2fc705cb6fd598b1380224..f89cdec9f1c455f187d92ab49ff4400703f314f6 100644 (file)
@@ -1,16 +1,17 @@
+#include <math.h>
+
+#include "item.hh"
 #include "misc.hh"
 #include "glob.hh"
 #include "moment.hh"
 
-#include <math.h>
 
 Moment
 wholes(int dur, int dots)
 {
     if (!dur)
-       return 0.0;
+       return 0;
 
-    // stupid Intel: doesn't crash if !dur
     Moment f = Rational(1)/Moment(dur);
     Moment delta = f;
 
@@ -36,3 +37,16 @@ log_2(double x) {
     return log(x)  /log(2.0);
 }
 
+Interval
+itemlist_width(const Array<Item*> &its)
+{
+    Interval iv ;
+    iv.set_empty();
+     
+    for (int j =0; j < its.size(); j++){
+       iv.unite (its[j]->width());
+
+    }
+    return iv;
+}
+