X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=flower%2Finclude%2Freal.hh;h=9ab3540ce4412e8fb929dd699baccd613be5bc25;hb=5b4b0d6e9a197e8f9eb085b7c2ad78b8be3e5cfc;hp=e395a761d5d4d8d59c2ff95cf5861a10be754a6b;hpb=2745cbd907f8216a4cc1fc5f488ae19efdfdbd10;p=lilypond.git diff --git a/flower/include/real.hh b/flower/include/real.hh index e395a761d5..9ab3540ce4 100644 --- a/flower/include/real.hh +++ b/flower/include/real.hh @@ -3,24 +3,35 @@ source file of the Flower Library - (c) 1997--2003 Han-Wen Nienhuys + (c) 1997--2008 Han-Wen Nienhuys */ - #ifndef REAL_HH #define REAL_HH - -#include +#include +#include +#include +using namespace std; typedef double Real; extern const Real infinity_f; +/* namespace std { */ + template inline T abs (T x) { return x > 0 ? x : -x; } +/* } namespace std */ + +inline Real +distance (Real x, Real y) +{ + return abs (x - y); +} + template inline int sign (T x) { if (x) @@ -28,26 +39,9 @@ template inline int sign (T x) 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