Description
contracts/split/src/calc.rs has a terse //! comment but does not explain why the largest-remainder method is used over simple floor division. Adding a //! # Why largest-remainder? section explaining rounding and the sum == total invariant would make the module self-sufficient for new contributors.
Acceptance Criteria
Context
- Target file:
contracts/split/src/calc.rs
Description
contracts/split/src/calc.rshas a terse//!comment but does not explain why the largest-remainder method is used over simple floor division. Adding a//! # Why largest-remainder?section explaining rounding and thesum == totalinvariant would make the module self-sufficient for new contributors.Acceptance Criteria
//!module doc incontracts/split/src/calc.rswith a# Why largest-remainder?sectionn-1stroops undistributed; LR assigns them to recipients with the largest fractional remainderscargo docbuilds without warningscargo testpassesContext
contracts/split/src/calc.rs