]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/spring.cc
Display postevents on drum notes, rests and spacer rests
[lilypond.git] / lily / spring.cc
index fc5b18f781f142de19cdd2cd55a8fab1e09ef58f..312b2ed00f49644598966832b50d1598396eae3b 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2007--2011 Joe Neeman <joeneeman@gmail.com>
+  Copyright (C) 2007--2012 Joe Neeman <joeneeman@gmail.com>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -97,9 +97,9 @@ merge_springs (vector<Spring> const &springs)
       min_distance = max (springs[i].min_distance (), min_distance);
     }
 
-  avg_stretch /= springs.size ();
-  avg_compress /= springs.size ();
-  avg_distance /= springs.size ();
+  avg_stretch /= Real (springs.size ());
+  avg_compress /= Real (springs.size ());
+  avg_distance /= Real (springs.size ());
   avg_distance = max (min_distance + 0.3, avg_distance);
 
   Spring ret = Spring (avg_distance, min_distance);