Skip to content

Commit 45a653e

Browse files
committed
[css-values-4] round(A, inf) needs to be depend on the rounding strategy. Fixes w3c#4725.
1 parent 862a93f commit 45a653e

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

css-values-4/Overview.bs

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2761,19 +2761,26 @@ Argument Ranges</h4>
27612761
In ''round(A, B)'',
27622762
if B is 0,
27632763
the result is NaN.
2764-
If both A and B are infinite,
2765-
the result is NaN.
27662764

2767-
If A is +∞ and B is finite,
2768-
the result is +∞.
2769-
If A is −∞ and B is finite,
2770-
the result is −∞.
2771-
2772-
If A is finite
2773-
and B is infinite,
2774-
the result is 0⁺
2775-
if A is 0⁺ or positive finite,
2776-
and 0⁻ if A is 0⁻ or negative finite.
2765+
If A is infinite,
2766+
the result is the same infinity.
2767+
2768+
If A is finite but B is infinite,
2769+
the result depends on the <<rounding-strategy>>
2770+
and the sign of A:
2771+
2772+
: ''nearest''
2773+
: ''to-zero''
2774+
:: If A is positive or 0⁺, return 0⁺.
2775+
Otherwise, return 0⁻.
2776+
: ''up''
2777+
:: If A is positive (not zero), return +∞.
2778+
If A is 0⁺, return 0⁺.
2779+
Otherwise, return 0⁻.
2780+
: ''down''
2781+
:: If A is negative (not zero), return −∞.
2782+
If A is 0⁻, return 0⁻.
2783+
Otherwise, return 0⁺.
27772784

27782785
In ''mod(A, B)'' or ''rem(A, B)'',
27792786
if B is 0,

0 commit comments

Comments
 (0)