You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if right_y >= 0.0 && right_y <= h {
let right_intersect = (w, right_y);
if let Some(s) = start {
if right_intersect != s {
return Some((s, right_intersect));
}
}
start = Some(right_intersect);
}
if left_y >= 0.0 && left_y <= h {
let left_intersect = (0.0, left_y);
if let Some(s) = start {
if left_intersect != s {
return Some((s, left_intersect));
}
}
start = Some(left_intersect);
}
if bottom_x >= 0.0 && bottom_x <= w {
let bottom_intersect = (bottom_x, h);
if let Some(s) = start {
if bottom_intersect != s {
return Some((s, bottom_intersect));
}
}
start = Some(bottom_intersect);
}
if top_x >= 0.0 && top_x <= w {
let top_intersect = (top_x, 0.0);
if let Some(s) = start {
if top_intersect != s {
return Some((s, top_intersect));
}
}
}
The text was updated successfully, but these errors were encountered:
With the current behaviour an intersection point at the corner of the image is counted twice. Under your proposal it's not counted at all. The function could be changed to return a list of intersection points and only return one point for a corner intersection but I think the current behaviour is reasonable.
need check two point is not a same point.
should be:
The text was updated successfully, but these errors were encountered: