X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fidealspacing.cc;h=90cfa1dbae38da7848f33a3eccc5bd50e20525fd;hb=d7416352b825c3e9b4858e1ddcf14f0c00e26d89;hp=f2638e0603e13cc6f8a9e6641e2ec1f70cf609a5;hpb=1cf3d59c1559fb9774c4c1c8cae155cfe54a927c;p=lilypond.git diff --git a/lily/idealspacing.cc b/lily/idealspacing.cc index f2638e0603..90cfa1dbae 100644 --- a/lily/idealspacing.cc +++ b/lily/idealspacing.cc @@ -3,46 +3,18 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997--1998 Han-Wen Nienhuys + (c) 1996--2000 Han-Wen Nienhuys */ #include "idealspacing.hh" -#include "p-col.hh" -#include "p-score.hh" +#include "paper-column.hh" +#include "paper-score.hh" #include "debug.hh" -void -Idealspacing::print() const -{ -#ifndef NPRINT - DOUT << "idealspacing {" ; - DOUT << "distance " << space_f_ << " strength " << hooke_f_; - DOUT << "left " << left_i_ << " right " << right_i_ << "}\n"; -#endif -} Idealspacing::Idealspacing() { space_f_ = 0.0; hooke_f_ = 0.0; - left_i_ = -1; - right_i_ = -1; -} - -void -Idealspacing::OK() const -{ - assert (hooke_f_ >= 0); -} - -Real -Idealspacing::energy_f(Real x) const -{ - Real dx = (space_f_ - x); - - Real e = sqr(dx); - if ( dx < 0) - e *= 4; // ugh. - - return hooke_f_ * e; + cols_drul_[LEFT] = cols_drul_[RIGHT] = -1; }