Skip to content

Commit

Permalink
Ensure that units are compatible with themselves (#2975)
Browse files Browse the repository at this point in the history
As pointed out by @stof in
#2951 (review).
  • Loading branch information
nex3 committed Dec 21, 2020
1 parent 150d805 commit 65a137b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spec/types/number.md
Expand Up @@ -47,8 +47,8 @@ The following conversion factors are defined:

### Compatible Units

Two units are said to be "compatible" if their [conversion factors] have the
same unit.
Two units are said to be "compatible" if they are identical or if their
[conversion factors] have the same unit.

[conversion factors]: #conversion-factors

Expand All @@ -67,6 +67,8 @@ have a conversion factor.

* Otherwise, throw an error.

* If `number`'s unit is `unit`, return `number` as-is.

* Let `number-factor` be `number`'s unit's conversion factor. If `number`
doesn't have a unit or that unit doesn't have a conversion factor, throw an
error.
Expand Down

0 comments on commit 65a137b

Please sign in to comment.