source file of the GNU LilyPond music typesetter
- (c) 1999--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ (c) 1999--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
TODO:
- add support for different stretch/shrink constants?
{
Spring sp = sorted_springs[i];
- assert (sp.blocking_force () <= cur_force);
+ if (sp.blocking_force () > cur_force)
+ continue;
+
if (isinf (sp.blocking_force ()))
break;
}
cur_len -= block_dist;
- inv_hooke -= sp.inverse_compress_strength ();
+ inv_hooke -= compressed ? sp.inverse_compress_strength () : sp.inverse_stretch_strength ();
cur_force = sp.blocking_force ();
}