]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/include/interval.hh
Merge branch 'lilypond/translation' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / flower / include / interval.hh
index ba28b1c76c2031062a7526d7776ceeed98311066..edb76deb1a7ae729b2267cd4ee6a80998806e110 100644 (file)
@@ -1,7 +1,7 @@
 /*
   interval.hh -- part of flowerlib
 
-  (c) 1996--2007 Han-Wen Nienhuys
+  (c) 1996--2009 Han-Wen Nienhuys
 */
 
 #ifndef INTERVAL_HH
@@ -14,7 +14,7 @@
 
 /* A T interval.  This represents the closed interval [left,right].
    No invariants.  T must be a totally ordered ring (with division, anyway ..)
-   At instantiation, the function infinity () has to be defined explicitely. */
+   At instantiation, the function infinity () has to be defined explicitly. */
 template<class T>
 struct Interval_t : public Drul_array<T>
 {
@@ -59,9 +59,6 @@ struct Interval_t : public Drul_array<T>
   void set_empty ();
   void set_full ();
 
-  /*
-    TODO: strip hungarian suffix.
-  */
   bool is_empty () const
   {
     return at (LEFT) > at (RIGHT);
@@ -103,11 +100,7 @@ struct Interval_t : public Drul_array<T>
     return *this;
   }
 
-  Real linear_combination (Real x) const
-  {
-    Drul_array<Real> 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,7 +121,7 @@ struct Interval_t : public Drul_array<T>
 
   static bool left_less (Interval_t<T> const &a, Interval_t<T> const &b)
   {
-    return a[LEFT] < b[RIGHT];
+    return a[LEFT] < b[LEFT];
   }
 };