]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/interval.cc
release: 1.5.9
[lilypond.git] / flower / interval.cc
index b307f4c634f5974ecf0fa12eddce38817f314218..ffcf4782b52d5726f3684d8b434f0b61a1253f5b 100644 (file)
@@ -1,18 +1,41 @@
-#include <assert.h> 
+/*
+  interval.cc -- instantiate Interval_t<Real>
+
+  source file of the Flower Library
+
+  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
 #include "interval.hh"
-#include <math.h>
+#include "real.hh"
+#include "interval.tcc"
 
-const Real INFTY = HUGE;
+Real
+Interval_t<Real>::infinity () 
+{
+  return HUGE_VAL;
+}
 
-void
-Interval::set_empty() {
-    min = INFTY;
-    max = -INFTY;
+String
+Interval_t<Real>::T_to_str (Real r)
+{
+  return to_str (r);
 }
 
-Real
-Interval::length() const {
-    assert(max >= min);
-    return max-min;
+
+int
+Interval_t<int>::infinity () 
+{
+  return INT_MAX;
 }
 
+String
+Interval_t<int>::T_to_str (int i)
+{
+  return to_str (i);
+}
+
+template INTERVAL__INSTANTIATE (int);
+template INTERVAL__INSTANTIATE (Real);
+