Use binary search to find line intersections to reduce floating point error.

This is probably improvable, but let's do the safe thing for now.

Closes #57.
Closes #58.
This commit is contained in:
Patrick Walton 2017-12-21 13:21:08 -08:00
parent f132117d4c
commit 2deb4fae2a
1 changed files with 1 additions and 2 deletions

View File

@ -1010,8 +1010,7 @@ impl<'a> Partitioner<'a> {
let (lower_line, _) =
Line::new(lower_left_vertex_position,
lower_right_endpoint_position).subdivide_at_x(max_x);
// Use `intersect_at_infinity()` to reduce floating point error.
upper_line.intersect_at_infinity(&lower_line)
upper_line.intersect(&lower_line)
}
(upper_control_point_vertex_index, u32::MAX) => {