mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-09 15:27:02 +00:00
`rdp` measured each sample to the infinite line through the ends of the line that would replace it. A sample beyond either end could be far from that line segment and still be dropped: a line to (100, 0), a 0.2 pt U-turn and a line back to (50, 0.2) became one line at a tolerance of 1 pt, leaving the tip 50 pt away. `rdp` now measures to the segment, so a sample beyond an end is measured to that end, and a zero-length chord measures to its point as before. The test `a_path_that_turns_back_past_its_end_converted_to_straight_lines_keeps_its_tip` covers that path.