Files
cadcraft/crates/engine
2ez4gcxandClaude Opus 5.5 2be869a154 Units and rtos: round a half away from zero, at 15 significant digits (#2484)
Decimal and scientific numbers went through Rust's formatting, which
rounds the exact binary value and a half to even: (rtos 1500.5 2 0)
gave 1500, (rtos 0.125 2 2) 0.12 and (rtos 1.005 2 2) 1.00.

AutoCAD 2024 gives 1501, 0.13 and 1.01: it rounds at 15 significant
digits, with a half away from zero, for scientific notation too
(2.5 to none is 3E+00). units::fixed does that on the decimal digits;
format_distance's decimal and scientific forms and rtos use it.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:45:57 -04:00
..