]> git.donarmstrong.com Git - lilypond.git/blobdiff - lib/duration.cc
release: 1.0.15
[lilypond.git] / lib / duration.cc
index 95e056b7899cca83be869eed18079f5f72b14a89..f65348ae6daa2a199124f5e49867bf42bf7ef337 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--1998 Jan Nieuwenhuizen <janneke@gnu.org>
+           Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include <assert.h>
@@ -38,6 +38,13 @@ Duration::duration_type_b (int t)
   return t == Duration_convert::type2_i (Duration_convert::i2_type (t));
 }
 
+void
+Duration::compress (Moment m)
+{
+  plet_.iso_i_ *= m.num_i ();
+  plet_.type_i_ *= m.den_i (); 
+}
+
 // ugh, what's this?
 // i should be called "mom ()", ... or at least "length_mom ()"
 Moment
@@ -82,3 +89,4 @@ Duration::plet_b ()
 {
   return !plet_.unit_b ();
 }
+