]> git.donarmstrong.com Git - lilypond.git/blobdiff - lib/duration.cc
release: 1.1.29
[lilypond.git] / lib / duration.cc
index 95e056b7899cca83be869eed18079f5f72b14a89..2c27bf17f156d82019b900c6929fbdd065eff375 100644 (file)
@@ -3,8 +3,8 @@
 
   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>
 */
 
 #include <assert.h>
@@ -38,10 +38,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 +87,4 @@ Duration::plet_b ()
 {
   return !plet_.unit_b ();
 }
+