]> git.donarmstrong.com Git - lilypond.git/commitdiff
flower-1.0.2
authorfred <fred>
Wed, 2 Oct 1996 22:07:55 +0000 (22:07 +0000)
committerfred <fred>
Wed, 2 Oct 1996 22:07:55 +0000 (22:07 +0000)
flower/real.hh [new file with mode: 0644]

diff --git a/flower/real.hh b/flower/real.hh
new file mode 100644 (file)
index 0000000..1f2187c
--- /dev/null
@@ -0,0 +1,25 @@
+#ifndef REAL_HH
+#define REAL_HH
+typedef double Real;
+inline Real sqr(Real x){
+    return x*x;
+}
+inline Real MIN(Real x, Real y) {
+    return (x < y)? x : y;
+}
+
+inline Real MAX(Real x, Real y) {
+    return (x > y) ? x : y;
+}
+
+inline Real ABS(Real x)
+{
+    return (x>0)? x:-x;
+}
+inline
+int sgn(Real x) {
+    if (!x)return 0;
+    return (x > 0) ?1: -1;
+}
+
+#endif