(barTwo): syntax update.
[lilypond.git] / flower / axis.cc
blob61cb194118110efbd8940ba433025d3ca3fc74aa
1 /*
2 axis.cc -- implement Axis
6 (c) 1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
9 #include <assert.h>
10 #include "axes.hh"
11 #include "string.hh"
13 String
14 axis_name_string (Axis a)
16 return to_string (char (a + 'x'));
20 Axis
21 other_axis (Axis a)
23 return a == Y_AXIS ? X_AXIS : Y_AXIS;
27 TODO inline these.
29 Axis
30 post_incr (Axis &a)
32 assert (a < NO_AXES);
33 Axis b= a;
34 a = Axis (int (a) + 1);
35 return b;
38 Axis
39 incr (Axis &a)
41 assert (a < NO_AXES);
42 a = Axis (int (a) + 1);
43 return a;