]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/multi-measure-rest.cc
*** empty log message ***
[lilypond.git] / lily / multi-measure-rest.cc
index 1cc6d2b0311cf8c79c4f8f444f1d6a7c0d3d2acf..f3430479944c9571993a6c526304ce22d70a6ce9 100644 (file)
@@ -50,12 +50,12 @@ Multi_measure_rest::percent (SCM smob)
     we gotta stay clear of sp_iv, so move a bit to the right if
     needed.
   */
-  x_off += (sp_iv[LEFT] - rx) >? 0;
+  x_off += max (sp_iv[LEFT] - rx, 0.0);
 
   /*
     center between stuff.
   */
-  x_off += sp_iv.length ()/ 2;
+  x_off += sp_iv.length () / 2;
 
   r.translate_axis (x_off, X_AXIS);
 
@@ -92,7 +92,7 @@ Multi_measure_rest::print (SCM smob)
     we gotta stay clear of sp_iv, so move a bit to the right if
     needed.
   */
-  Real x_off = (sp_iv[LEFT] - rx) >? 0;
+  Real x_off = max (sp_iv[LEFT] - rx, 0.0);
 
   Stencil mol;
   mol.add_stencil (symbol_stencil (me, space));
@@ -124,7 +124,7 @@ Multi_measure_rest::symbol_stencil (Grob *me, Real space)
   if (measures > scm_to_int (limit))
     {
       Real padding = 0.15;
-      Stencil s = big_rest (me, (1.0 - 2*padding) * space);
+      Stencil s = big_rest (me, (1.0 - 2 * padding) * space);
       s.translate_axis (padding * space, X_AXIS);
       return s;
     }
@@ -180,12 +180,12 @@ Multi_measure_rest::big_rest (Grob *me, Real width)
   Real slt = me->get_layout ()->get_dimension (ly_symbol2scm ("linethickness"));
   Real y = slt * thick_thick / 2 * ss;
   Real ythick = hair_thick * slt * ss;
-  Box b (Interval (0, 0 >? (width - 2 * ythick)), Interval (-y, y));
+  Box b (Interval (0.0, max (0.0, (width - 2 * ythick))), Interval (-y, y));
 
-  Real blot = width ? (.8 * (y <? ythick)) : 0.0;
+  Real blot = width ? (.8 * min (y, ythick)) : 0.0;
 
   Stencil m = Lookup::round_filled_box (b, blot);
-  Stencil yb = Lookup::round_filled_box (Box (Interval (-0.5, 0.5)* ythick, Interval (-ss, ss)), blot);
+  Stencil yb = Lookup::round_filled_box (Box (Interval (-0.5, 0.5) * ythick, Interval (-ss, ss)), blot);
 
   m.add_at_edge (X_AXIS, RIGHT, yb, 0, 0);
   m.add_at_edge (X_AXIS, LEFT, yb, 0, 0);
@@ -239,7 +239,7 @@ Multi_measure_rest::church_rest (Grob *me, Font_metric *musfont, int measures,
              l -= 4;
              k = -2;
            }
-         else if (l>= 2)
+         else if (l >= 2)
            {
              l -= 2;
              k = -1;