X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fsimple-spacer-scheme.cc;h=3df7d2f7dddb41c60ce1a4d501f44ff6d36c93b3;hb=446103a87933b297c209e87fec94e97fe9462ad0;hp=fda38ab503bb41de7039116a15448f34b8a38525;hpb=a200088f8b69a03e02c466feb7ed45722cd6a2f7;p=lilypond.git diff --git a/lily/simple-spacer-scheme.cc b/lily/simple-spacer-scheme.cc index fda38ab503..3df7d2f7dd 100644 --- a/lily/simple-spacer-scheme.cc +++ b/lily/simple-spacer-scheme.cc @@ -1,9 +1,20 @@ /* - simple-spacer-scheme.cc -- implement Simple_spacer + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2005--2011 Han-Wen Nienhuys - (c) 2005--2007 Han-Wen Nienhuys + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #include @@ -44,7 +55,11 @@ LY_DEFINE (ly_solve_spring_rod_problem, "ly:solve-spring-rod-problem", Real ideal = scm_to_double (scm_caar (s)); Real inv_hooke = scm_to_double (scm_cadar (s)); - spacer.add_spring (ideal, inv_hooke); + Spring sp (ideal, 0.0); + sp.set_inverse_compress_strength (inv_hooke); + sp.set_inverse_stretch_strength (inv_hooke); + + spacer.add_spring (sp); } for (SCM s = rods; scm_is_pair (s); s = scm_cdr (s))