(parse_symbol_list): Bugfix.
[lilypond/patrick.git] / flower / include / real.hh
blob966406f60879fef206fbf1886df12c721f24ab84
1 /*
2 real.hh -- declare Real
4 source file of the Flower Library
6 (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
9 #ifndef REAL_HH
10 #define REAL_HH
12 #include <algorithm>
13 #include <climits>
15 typedef double Real;
16 extern const Real infinity_f;
17 using namespace std;
19 template<class T> inline T abs (T x)
21 return x > 0 ? x : -x;
24 template<class T> inline int sign (T x)
26 if (x)
27 return x > T (0) ? 1 : -1;
28 return 0;
31 template<class T> inline T sqr (T x)
33 return x * x;
36 inline Real
37 distance (Real x, Real y)
39 return abs (x - y);
42 #endif