X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fmisc.cc;h=6cafa2b50b3669fac258e5d2b1d3e51cdb737db1;hb=8659a99f233f5c4684292728e7ad4206669b35b0;hp=77fbb2137489cb55ed16fe04a205200958a7a381;hpb=59a6d1a06432fc0ca88c3023c646182f389ec1b5;p=lilypond.git diff --git a/lily/misc.cc b/lily/misc.cc index 77fbb21374..6cafa2b50b 100644 --- a/lily/misc.cc +++ b/lily/misc.cc @@ -22,28 +22,6 @@ #include "offset.hh" #include "warn.hh" -using std::string; -using std::vector; - -/* - Return the 2-log, rounded down -*/ -int -intlog2 (int d) -{ - if (d <= 0) - error ("intlog2 with negative argument: " + ::to_string (d)); - int i = 0; - while ((d != 1)) - { - d /= 2; - i++; - } - - assert (! (d / 2)); - return i; -} - double log_2 (double x) { @@ -67,7 +45,7 @@ peak_around (Real epsilon, Real threshold, Real x) { if (x < 0) return 1.0; - return std::max (- epsilon * (x - threshold) / ((x + epsilon) * threshold), 0.0); + return max (- epsilon * (x - threshold) / ((x + epsilon) * threshold), 0.0); } /*