]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/misc.cc
* lily/rest.cc (y_offset_callback): merge function of 3 callbacks.
[lilypond.git] / lily / misc.cc
index 08f3827abbf48122cc27ceb281e455ebe5aebe23..bfc97761c0efd940c373b72a5db02fcc916f12bd 100644 (file)
@@ -58,3 +58,14 @@ split_string (String s, char c)
 
   return rv;
 }
+
+
+Real
+directed_round (Real f, Direction d)
+{
+  if (d < 0)
+    return floor (f);
+  else
+    return ceil (f);
+}
+