]> git.donarmstrong.com Git - lilypond.git/blob - flower/include/axes.hh
d2d57e0fbf6cfcb0c37f6d37225c7fce0fd4d789
[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--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9
10 #ifndef AXES_HH
11 #define AXES_HH
12
13 #include <assert.h>
14
15 enum Axis {
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