-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support
QuantityPoint
in rounding functions (#237)
Includes the `round`, `floor`, and `ceil` families. There's more subtlety here than for `Quantity`, because we can have additive offsets. However, since these functions all aim to behave like the standard library, and the standard library always uses floating point, then it's actually quite simple. The way we handle rounding a quantity point in different units than it's stored is to first perform the conversion, then do the rounding. As with quantities, we use `RoundingRep` to make sure we're using a sane floating point type to perform the conversion. Includes a bunch of new test cases, and doc updates. Fixes #221.
- Loading branch information
Showing
3 changed files
with
340 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.