]> git.donarmstrong.com Git - lilypond.git/blobdiff - lib/duration.cc
release: 1.1.43
[lilypond.git] / lib / duration.cc
index 95e056b7899cca83be869eed18079f5f72b14a89..bd9435fd829167c269d192a2d7f7386c974e3d43 100644 (file)
@@ -3,13 +3,16 @@
 
   source file of the LilyPond music typesetter
 
-  (c)  1997--1998 Jan Nieuwenhuizen <jan@digicash.com>
-           Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1999 Jan Nieuwenhuizen <janneke@gnu.org>
+           Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+
+  UGH. Duration is broken.
 */
 
 #include <assert.h>
+
 #include "proto.hh"
-#include "plist.hh"
 #include "string.hh"
 #include "source-file.hh"
 #include "source.hh"
@@ -38,10 +41,15 @@ Duration::duration_type_b (int t)
   return t == Duration_convert::type2_i (Duration_convert::i2_type (t));
 }
 
-// ugh, what's this?
-// i should be called "mom ()", ... or at least "length_mom ()"
+void
+Duration::compress (Moment m)
+{
+  plet_.iso_i_ *= m.num_i ();
+  plet_.type_i_ *= m.den_i (); 
+}
+
 Moment
-Duration::length () const
+Duration::length_mom () const
 {
   return Duration_convert::dur2_mom (*this);
 }
@@ -82,3 +90,4 @@ Duration::plet_b ()
 {
   return !plet_.unit_b ();
 }
+