]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/direction.hh
release: 0.1.52
[lilypond.git] / lily / include / direction.hh
index d02274f6c1e762923ae9786dc989620aae39b5a4..66abd5f379f570a878220d1e9063236f846c04ba 100644 (file)
@@ -19,9 +19,17 @@ enum Direction
   CENTER=0,
   SMALLER=-1,
   BIGGER=1,
-
 };
 
+inline Direction
+flip (Direction *i) {
+  if (*i == (Direction)1)
+    *i = (Direction)-1;
+  else if (*i == (Direction)-1)
+    *i = (Direction)1;
+  return *i;
+}
+
 /**
    if d > 0: the max operator
    if d < 0: the min operator