Files
figcraft/crates
Trevor BrownandClaude Fable 5.1 8e6a04baf6 M8: shape builders cap sizes, radii and angles at 1e9, so an absurd value cannot build millions of segments
Found while testing crates/geom/src/lib.rs (no existing issue): the builders replaced NaN and infinities with 0 but took any finite size, and kurbo subdivides an arc in proportion to the sixth root of its radius, so ellipse(1e36, ...) built about a million cubics and 1e60 never returned (sizes arrive from files and commands). The sanitizer now also clamps magnitudes to MAX_COORD (1e9, the bound measure::finite_path already uses). Polyline::nearest returns None for a non-finite point instead of Some((NaN, NaN)). Tests cover 1e36, 1e300 and f64::MAX for every builder.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-31 11:27:13 -04:00
..