-
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.
We also add the "common point" versions of these. The absence of `common_unit` and `common_point_unit` was mostly just an oversight. I recently tried to call one in Godbolt, and got surprised when I couldn't. And it turned out that I had already written this function anyway, except that it was hidden away inside of a test file. As I thought about these functions more, I thought it was interesting that the inputs are unit slots, so we could have a wide variety of things (simple units, quantity makers, unit symbols, etc.), but the output would always be a simple unit. Wouldn't it be nice if we could also combine `meters` and `feet`, or `m` and `ft`, and have the output act like its inputs? This idea became the `make_common` and `make_common_point` utilities. Docs included (and rendered and tested). --------- Co-authored-by: Michael Hordijk <[email protected]>
- Loading branch information
1 parent
30e0b27
commit 3074486
Showing
3 changed files
with
163 additions
and
7 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
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
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