for (SCM s = me->get_property ("stems"); scm_is_pair (s); s = scm_cdr (s))
{
Grob *stem = unsmob_grob (scm_car (s));
- m = m >? (Stem::beam_multiplicity (stem).length () + 1);
+ m = max (m, (Stem::beam_multiplicity (stem).length () + 1));
}
return m;
}
int count = visible_stem_count (me);
if (count < 2)
{
- me->warning (_ ("beam has less than two visible stems"));
-
SCM stems = me->get_property ("stems");
if (scm_ilength (stems) == 1)
{
Real lw = nw_f;
Real rw = nw_f;
if (i > 0)
- rw = nw_f <? ((xposn - last_xposn) / 2);
+ rw = min (nw_f, ((xposn - last_xposn) / 2));
else
/*
TODO: 0.5 is a guess.
- 0.5;
if (st)
- lw = nw_f <? ((xposn - last_xposn) / 2);
+ lw = min (nw_f, ((xposn - last_xposn) / 2));
else
lw = me->get_bound (RIGHT)->relative_coordinate (xcommon, X_AXIS)
- last_xposn;
Grob *s = stems[i];
Direction sd = get_grob_direction (s);
- int center_distance = int (- d * Stem::head_positions (s) [-d]) >? 0;
+ int center_distance = max (int (- d * Stem::head_positions (s) [-d]), 0);
int current = sd ? (1 + d * sd) / 2 : center_distance;
if (current)
Real inter = 0.5;
Real hang = 1.0 - (thickness - slt) / 2;
- *dy = sign (*dy) * (fabs (*dy)
- >?
- (sit <? inter <? hang));
+ *dy = sign (*dy) * max (fabs (*dy),
+ min (min (sit, inter), hang));
}
}
if (i > 0
&& i < stems.size () -1
&& Stem::is_invisible (st))
- b = b <? beaming->infos_.elem (i).beams_i_drul_[-d];
+ b = min (b, beaming->infos_.elem (i).beams_i_drul_[-d]);
Stem::set_beaming (st, b, d);
}
Beam::rest_collision_callback (SCM element_smob, SCM axis)
{
Grob *rest = unsmob_grob (element_smob);
- Axis a = (Axis) scm_to_int (axis);
+ (void) axis;
if (scm_is_number (rest->get_property ("staff-position")))
return scm_int2num (0);
- assert (a == Y_AXIS);
+ assert (scm_to_int (axis) == Y_AXIS);
Grob *st = unsmob_grob (rest->get_property ("stem"));
Grob *stem = st;
= + staff_space * (robust_scm2double (stem->get_property ("stemlet-length"), 0.0)
+ robust_scm2double (rest->get_property ("minimum-distance"), 0.0));
- Real shift = d * (((beam_y - d * minimum_distance) - rest_dim) * d <? 0.0);
+ Real shift = d * min (((beam_y - d * minimum_distance) - rest_dim) * d, 0.0);
shift /= staff_space;
Real rad = Staff_symbol_referencer::line_count (rest) * staff_space / 2;
Should we take invisible stems into account?
*/
if (Stem::get_direction (stems[i]) == d)
- bc = bc >? (Stem::beam_multiplicity (stems[i]).length () + 1);
+ bc = max (bc, (Stem::beam_multiplicity (stems[i]).length () + 1));
}
return bc;