X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fmisc.hh;h=12392c0cacd804dcee2db84c0e0aaec93ef0651a;hb=38d7d319eabc906e82fb42002678c6d42a23b6f7;hp=be9b2c4f2c51c7ca1ac07c3665f394937cac00ce;hpb=51805662a1a967b79469efe05a5a73ffa55fc5e8;p=lilypond.git diff --git a/lily/include/misc.hh b/lily/include/misc.hh index be9b2c4f2c..12392c0cac 100644 --- a/lily/include/misc.hh +++ b/lily/include/misc.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 2005--2006 Han-Wen Nienhuys + (c) 2005--2009 Han-Wen Nienhuys */ #ifndef MISC_HH @@ -28,6 +28,13 @@ sign (int i) else return 0; } +inline int +shift_left (int value, int shiftamount) +{ + if (shiftamount < 0) return (value >> -shiftamount); + else return (value << shiftamount); +} + inline Real linear_interpolate (Real x, Real x1, Real x2, Real y1, Real y2) { @@ -37,5 +44,9 @@ linear_interpolate (Real x, Real x1, Real x2, Real y1, Real y2) Real directed_round (Real f, Direction d); +Real peak_around (Real epsilon, Real threshold, Real x); +Real convex_amplifier (Real standard_x, Real increase_factor, Real x); +string camel_case_to_lisp_identifier (string in); + #endif