From 8aa8a3da1f492439d5bbb779cfe2ad36f66cc259 Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:32:03 +0000 Subject: [PATCH] lilypond-0.0.32 --- hdr/misc.hh | 4 ++-- src/misc.cc | 20 +++++++++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/hdr/misc.hh b/hdr/misc.hh index ae288151a2..00b742076e 100644 --- a/hdr/misc.hh +++ b/hdr/misc.hh @@ -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 &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 &its); #endif diff --git a/src/misc.cc b/src/misc.cc index a8fe2c026d..f89cdec9f1 100644 --- a/src/misc.cc +++ b/src/misc.cc @@ -1,16 +1,17 @@ +#include + +#include "item.hh" #include "misc.hh" #include "glob.hh" #include "moment.hh" -#include 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 &its) +{ + Interval iv ; + iv.set_empty(); + + for (int j =0; j < its.size(); j++){ + iv.unite (its[j]->width()); + + } + return iv; +} + -- 2.39.5