flower-1.0.2
[lilypond.git] / real.hh
blob1f2187c8c1a528da7ea8d93988bdbde4bb3f6a8c
1 #ifndef REAL_HH
2 #define REAL_HH
3 typedef double Real;
4 inline Real sqr(Real x){
5 return x*x;
7 inline Real MIN(Real x, Real y) {
8 return (x < y)? x : y;
11 inline Real MAX(Real x, Real y) {
12 return (x > y) ? x : y;
15 inline Real ABS(Real x)
17 return (x>0)? x:-x;
19 inline
20 int sgn(Real x) {
21 if (!x)return 0;
22 return (x > 0) ?1: -1;
25 #endif