]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/include/real.hh
add version to augmentum.ly
[lilypond.git] / flower / include / real.hh
index 630d3dd692e283c401d45b04f9b7b4e41a4ef4c0..2185d9b46b81ee6eaece34d71bc9f817646d613d 100644 (file)
@@ -3,52 +3,51 @@
 
   source file of the Flower Library
 
-  (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1997--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
-
 #ifndef REAL_HH
 #define REAL_HH
 
+#include <algorithm>
+#include <climits>
 
+/*
+  MacOS 10.3 uses g++ 3.3 which doesn't have isinf()
+ */
+// #include <cmath>
 #include <math.h>
-#include <limits.h>
+using namespace std;
+
 
 typedef double Real;
-const Real infinity_f = HUGE_VAL;
+extern const Real infinity_f;
 
+/* namespace std { */
+  
 template<class T> inline T abs (T x)
 {
   return x > 0 ? x : -x;
 }
 
-template<class T> inline int sign (T x)
-{
-  if (x)
-    return x > T(0) ? 1 : -1;
-  return 0;
-}
+/* } namespace std */
 
-template<class T> inline T max (T x, T y)
-{
-  return x >? y;
-}
-
-template<class T> inline T sqr (T x)
+inline Real
+distance (Real x, Real y)
 {
-  return x*x;
+  return abs (x - y);
 }
 
-
-template<class T> inline T min (T x, T y)
+template<class T> inline int sign (T x)
 {
-  return x <? y;
+  if (x)
+    return x > T (0) ? 1 : -1;
+  return 0;
 }
 
-inline Real
-distance (Real x,Real y)
+template<class T> inline T sqr (T x)
 {
-    return abs (x-y);
+  return x * x;
 }
 
 #endif