X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=flower%2Finclude%2Finterval.hh;h=045b10389e7df10655d5ac88b702d0ef540759d2;hb=9d9e2e5637e06d98245c3395b58207ec173e7e7d;hp=1b095dedc307e1ed8a5460b561a5fc87b23e3b90;hpb=9f3572d98bb948c9689cd1f75401a029451fa001;p=lilypond.git diff --git a/flower/include/interval.hh b/flower/include/interval.hh index 1b095dedc3..045b10389e 100644 --- a/flower/include/interval.hh +++ b/flower/include/interval.hh @@ -1,7 +1,7 @@ /* interval.hh -- part of flowerlib - (c) 1996--2006 Han-Wen Nienhuys + (c) 1996--2007 Han-Wen Nienhuys */ #ifndef INTERVAL_HH @@ -9,8 +9,6 @@ #include -#include "std-string.hh" - #include "flower-proto.hh" #include "drul-array.hh" @@ -61,9 +59,6 @@ struct Interval_t : public Drul_array void set_empty (); void set_full (); - /* - TODO: strip hungarian suffix. - */ bool is_empty () const { return at (LEFT) > at (RIGHT); @@ -105,11 +100,7 @@ struct Interval_t : public Drul_array return *this; } - Real linear_combination (Real x) const - { - Drul_array da (at (LEFT), at (RIGHT)); - return ::linear_combination (da, x); - } + Real linear_combination (Real x) const; string to_string () const; bool contains (T r) const; @@ -128,9 +119,9 @@ struct Interval_t : public Drul_array at (RIGHT) = t; } - static int left_comparison (Interval_t const &a, Interval_t const &b) + static bool left_less (Interval_t const &a, Interval_t const &b) { - return sign (a[LEFT] - b[RIGHT]); + return a[LEFT] < b[RIGHT]; } };