]> git.donarmstrong.com Git - lilypond.git/blob - boxes.cc
release: 0.0.6
[lilypond.git] / boxes.cc
1 #include "boxes.hh"
2 #include "const.hh"
3
4 void
5 Interval::set_empty() {
6     min = INFTY;
7     max = -INFTY;
8 }
9 Real
10 Interval::length() const {
11     return max-min;
12 }
13 Box::Box(svec<Real> s)
14 {
15     assert(s.sz() == 4);
16     x.min = s[0];
17     x.max = s[1];
18     y.min = s[2];
19     y.max = s[3];
20 }
21
22 Box::Box()
23 {        
24 }
25
26 Box::Box(Interval ix, Interval iy)
27 {
28     x = ix;
29     y = iy;
30 }
31