d * dot_product (z, dz_perp));
bool close_to_edge = false;
- Direction d = LEFT;
- do
+ for (LEFT_and_RIGHT (d))
close_to_edge = close_to_edge || -d * (p[X_AXIS] - curve_xext[d]) < close_to_edge_length;
- while (flip (&d) != LEFT);
if (close_to_edge)
continue;
to prevent numerical inaccuracies in
Bezier::get_other_coordinate ().
*/
- Direction d = LEFT;
+
bool found = false;
Real y = 0.0;
- do
+ for (LEFT_and_RIGHT (d))
{
/*
We need to check for the bound explicitly, since the
}
}
- while (flip (&d) != LEFT);
if (!found)
{
void
Slur_configuration::score_edges (Slur_score_state const &state)
{
- Direction d = LEFT;
+
Offset dz = attachment_[RIGHT]
- attachment_[LEFT];
Real slope = dz[Y_AXIS] / dz[X_AXIS];
- do
+ for (LEFT_and_RIGHT (d))
{
Real y = attachment_[d][Y_AXIS];
Real dy = fabs (y - state.base_attachments_[d][Y_AXIS]);
string dir_str = d == LEFT ? "L" : "R";
add_score (demerit, dir_str + " edge");
}
- while (flip (&d) != LEFT);
}
void