repo.or.cz
/
lilypond.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
lilypond-0.0.5
[lilypond.git]
/
boxes.cc
blob
ebfc08abfe02c7861e90e4bea5b40567339752e2
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