]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/axis.cc
huh
[lilypond.git] / flower / axis.cc
index b4446bed5f309b4b9c27ba92427da5bcf5c334e5..b9fc00b0040cc95044ad03cf548e2eca932d74ae 100644 (file)
@@ -3,35 +3,43 @@
 
 
 
-  (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include <assert.h>
 #include "axes.hh"
+#include "string.hh"
 
 String
-axis_name_str (Axis a)
+axis_name_string (Axis a)
 {
-  return to_str (char(a + 'x'));
+  return to_string (char (a + 'x'));
+}
+
+
+Axis
+other_axis (Axis a)
+{
+  return a ==  Y_AXIS ? X_AXIS : Y_AXIS;
 }
 
 /*
   TODO inline these.
  */
 Axis
-post_incr(Axis &a)
+post_incr (Axis &a)
 {
-  assert(a < NO_AXES);
+  assert (a < NO_AXES);
   Axis b= a;
-  a = Axis(int(a) + 1);
+  a = Axis (int (a) + 1);
   return b;
 }
 
 Axis
-incr(Axis &a)
+incr (Axis &a)
 {
-  assert(a < NO_AXES);
-  a = Axis(int(a) + 1);
+  assert (a < NO_AXES);
+  a = Axis (int (a) + 1);
   return a;
 }