]> git.donarmstrong.com Git - lilypond.git/commitdiff
flower-1.0.8
authorfred <fred>
Wed, 27 Nov 1996 01:40:37 +0000 (01:40 +0000)
committerfred <fred>
Wed, 27 Nov 1996 01:40:37 +0000 (01:40 +0000)
flower/interval.cc [new file with mode: 0644]

diff --git a/flower/interval.cc b/flower/interval.cc
new file mode 100644 (file)
index 0000000..b307f4c
--- /dev/null
@@ -0,0 +1,18 @@
+#include <assert.h> 
+#include "interval.hh"
+#include <math.h>
+
+const Real INFTY = HUGE;
+
+void
+Interval::set_empty() {
+    min = INFTY;
+    max = -INFTY;
+}
+
+Real
+Interval::length() const {
+    assert(max >= min);
+    return max-min;
+}
+