Feedback
Allow Round() callers to choose the midpoint rounding mode
- Status
- Fixed
- Fixed in
- v26.8.6
- Source discussion
- https://forum.objo.dev/d/891-mathsround-should-accept-negative-numbers/4
- Last updated
- 2026-08-29
Upvotes
0 upvotes
Uses your Objo forum account.
Public summary
Allow callers of Maths.Round() and Double.Round() to choose whether midpoint values use ties-to-even or ties-away-from-zero rounding.
The rounding mode is optional. Existing calls such as value.Round(), value.Round(2), Maths.Round(value), and Maths.Round(value, 2) continue to work unchanged and retain ties-to-even as the default. Callers that need another policy can explicitly select AwayFromZero, including when rounding to negative decimal places.
This enables compatibility with external systems that require ties-away-from-zero while preserving Objo’s simple default API and current behaviour.