From: fred Date: Sun, 24 Mar 2002 20:06:30 +0000 (+0000) Subject: lilypond-0.1.48 X-Git-Tag: release/1.5.59~3395 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ae535e74f3da1bc532710a1e972aa5907299f928;p=lilypond.git lilypond-0.1.48 --- diff --git a/flower/NEWS b/flower/NEWS index 06f5939f59..d749b00308 100644 --- a/flower/NEWS +++ b/flower/NEWS @@ -1,3 +1,6 @@ +pl 38 + - Rational + - Real.hh fixes pl 37 - various String/File_path mucking diff --git a/flower/include/real.hh b/flower/include/real.hh index 2e8b160a22..5b5bc26f7a 100644 --- a/flower/include/real.hh +++ b/flower/include/real.hh @@ -11,14 +11,41 @@ #define REAL_HH -#include -#include #include #include typedef double Real; const Real infinity_f = HUGE_VAL; + +template inline T abs (T x) +{ + return x > 0 ? x : -x; +} + +template inline int sign (T x) +{ + if (x) + return x > 0 ? 1 : -1; + return 0; +} + +template inline T max (T x, T y) +{ + return x >? y; +} + +template inline T sqr (T x) +{ + return x*x; +} + + +template inline T min (T x, T y) +{ + return x | @@ -65,11 +62,10 @@ praeludium_left = \melodic { [cis'8 a8 d'8 cis'8] [bis8 gis8] cis'4 | dis'2 cis'4 r8 cis'8 } { \stemup bis2 } - { \stemup \doshift r4 gis4 ~ - [gis 8 gis8] ~ \stemdown \noshift gis4 | + { \stemup \Shift r4 gis4 ~ [gis 8 gis8] ~ \stemdown \noShift gis4 | a4. fis8 gis4. a8 ~ | a4 gis4 gis4 r8 gis8 } - { \stemup \property Voice.hshift = 2 s4 fis4 e} + { \stemup \Shift s4 fis4 e} { \stemdown s4 dis4 cis4 } > | % 16 @@ -112,9 +108,9 @@ fuga2_right = \melodic { | %} \multi 2 < - { \stemup \noshift e'4 } - { \stemup \doshift cis'4 } - { \stemup \property Voice.hshift = 2 ais4 } + { \stemup \noShift e'4 } + { \stemup \Shift cis'4 } + { \stemup \Shift ais4 } { \stemdown fis4 } > | % 16 @@ -122,7 +118,7 @@ fuga2_right = \melodic { { \stemup dis'2 dis'4 | cis'2 cis'4 | b4. [cis'8 dis'8 e'8] } - { \stemup \doshift [b8 fis8] b2 ~ | + { \stemup \Shift [b8 fis8] b2 ~ | [b8 a!16 gis16] a2 ~ | a4 gis2 } { \stemdown fis2. ~ |