]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/include/direction.hh
Implement minmax()
[lilypond.git] / flower / include / direction.hh
index 0ba482fe2c580ff9ac73926879c075484439decc..befd0aa2ac207e4f2a18208a45bbf0ddb611047b 100644 (file)
@@ -75,7 +75,13 @@ flip (Direction *i)
    if d > 0: the max operator
    if d < 0: the min operator
 */
-template<class T> T minmax (Direction d, T, T);
+template<class T> T minmax (Direction d, T a, T b)
+{
+  if (d == UP)
+    return max (a, b);
+  else
+    return min (a, b);
+}
 
 // String direction_string (Direction, Axis);