Skip to content

Commit 457e36d

Browse files
committed
[css-values-3] Make Oriol happy by not abusing range notation if mod()/rem(); also make it clear which zero is returned.
1 parent f3ff0dd commit 457e36d

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

css-values-4/Overview.bs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2670,8 +2670,11 @@ Stepped Value Functions: ''round()'', ''mod()'', and ''rem()''</h3>
26702670
if both arguments are positive or both are negative:
26712671
the value of the function is equal to the value of A
26722672
shifted by the integer multiple of B
2673-
that brings the value into the range [0, B)
2674-
(that is, possibly including zero, but excluding B itself).
2673+
that brings the value <dfn noexport>between zero and B</dfn>.
2674+
(Specifically, the range includes zero
2675+
and excludes B.
2676+
More specifically, if B is positive the range starts at 0⁺,
2677+
and if B is negative it starts at 0⁻.)
26752678

26762679
<div class=example>
26772680
For example, ''mod(18px, 5px)'' resolves to the value ''3px'',
@@ -2689,12 +2692,12 @@ Stepped Value Functions: ''round()'', ''mod()'', and ''rem()''</h3>
26892692
are on opposite sides of zero:
26902693
''mod()'' (short for “modulus”)
26912694
continues to choose the integer multiple of B
2692-
that puts the value into the [0, B) range
2695+
that puts the value [=between zero and B=], as above
26932696
(guaranteeing that the result will either be zero
26942697
or share the sign of B, not A),
26952698
while ''rem()'' (short for "remainder")
26962699
chooses the integer multiple of B
2697-
that brings the value into the range [0, -B),
2700+
that puts the value [=between zero and B|between zero and -B=],
26982701
avoiding changing the sign of the value.
26992702

27002703
<div class=example>

0 commit comments

Comments
 (0)