summaryrefslogtreecommitdiff
path: root/flower/interval.cc
blob: b307f4c634f5974ecf0fa12eddce38817f314218 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;
}