]> git.donarmstrong.com Git - lilypond.git/blob - flower/include/axes.hh
* flower
[lilypond.git] / flower / include / axes.hh
1 /*
2   axes.hh -- declare Axis
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9 #ifndef AXES_HH
10 #define AXES_HH
11
12 #include <cassert>
13
14 enum Axis
15   {
16     X_AXIS =0,
17     Y_AXIS =1,
18     NO_AXES = 2,
19   };
20
21 static inline
22 Axis
23 incr (Axis &a)
24 {
25   assert (a < NO_AXES);
26   a = Axis (int (a) + 1);
27   return a;
28 }
29
30 static inline
31 Axis
32 other_axis (Axis a)
33 {
34   return a == Y_AXIS ? X_AXIS : Y_AXIS;
35 }
36
37 #endif // AXES_HH