equal
deleted
inserted
replaced
108 (iy - m.y) * p.x / p.y + m.x |
108 (iy - m.y) * p.x / p.y + m.x |
109 } else { |
109 } else { |
110 (iy - s.y) * f.x / f.y + s.x |
110 (iy - s.y) * f.x / f.y + s.x |
111 }; |
111 }; |
112 |
112 |
113 let intersection_point = Point::new(ix, iy); |
113 let intersection_point = Point::new(ix, iy).fit(intersections_box); |
114 let diff_point = m - intersection_point; |
114 let diff_point = m - intersection_point; |
115 let t = p.dot(diff_point); |
115 let t = p.dot(diff_point); |
116 if diff_point.max_norm() >= std::i16::MAX as i32 { |
116 if diff_point.max_norm() >= std::i16::MAX as i32 { |
117 Some((t, std::i32::MAX as u32)) |
117 Some((t, std::i32::MAX as u32)) |
118 } else { |
118 } else { |