X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fmisc.hh;h=12392c0cacd804dcee2db84c0e0aaec93ef0651a;hb=09bf9a18185476020686ff65b5d70b57051be780;hp=088feb91c78cbfe2eb90d47ed731411115c87d01;hpb=7f3f0083f89d87c5ed0422858e9648fc759e98a4;p=lilypond.git diff --git a/lily/include/misc.hh b/lily/include/misc.hh index 088feb91c7..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--2008 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) {