]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/direction.hh
release: 0.1.52
[lilypond.git] / lily / include / direction.hh
1 /*
2   direction.hh -- declare 
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8
9
10 #ifndef DIRECTION_HH
11 #define DIRECTION_HH
12
13 enum Direction 
14 {
15   UP=1,
16   DOWN=-1,
17   LEFT=-1,
18   RIGHT=1,
19   CENTER=0,
20   SMALLER=-1,
21   BIGGER=1,
22 };
23
24 inline Direction
25 flip (Direction *i) {
26   if (*i == (Direction)1)
27     *i = (Direction)-1;
28   else if (*i == (Direction)-1)
29     *i = (Direction)1;
30   return *i;
31 }
32
33 /**
34    if d > 0: the max operator
35    if d < 0: the min operator
36  */
37 template<class T> minmax (Direction d, T, T);
38
39
40 #endif // DIRECTION_HH