File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -1140,7 +1140,7 @@ The following are the arithmetic operations you can perform on dimensions:
11401140 1. Let |item| be a [=tuple=] with its [=sum value/value=]
11411141 set to the product of the [=sum value/values=] of |item1| and |item2|,
11421142 and its [=sum value/unit map=]
1143- set to the union of the [=sum value/unit maps=] of |item1| and |item2|,
1143+ set to the [=product of two unit maps|product=] of the [=sum value/unit maps=] of |item1| and |item2|,
11441144 with all [=map/entries=] with a zero value removed.
11451145
11461146 2. Append |item| to |temp|.
@@ -1214,6 +1214,21 @@ The following are the arithmetic operations you can perform on dimensions:
12141214
12151215 3. Return the result of [=multiplying=] all the [=list/items=] of |types|.
12161216 </div>
1217+
1218+ <div algorithm>
1219+ The <dfn>product of two unit maps</dfn> |units1| and |units2|
1220+ is the result given by the following steps:
1221+
1222+ 1. Let |result| be a copy of |units1|.
1223+
1224+ 2. [=map/For each=] |unit| → |power| in |units2|:
1225+
1226+ 1. If |result|[|unit|] [=map/exists=] ,
1227+ increment |result|[|unit|] by |power|.
1228+ 3. Otherwise, set |result|[|unit|] to |power|.
1229+
1230+ 3. Return |result|.
1231+ </div>
12171232</div>
12181233
12191234The {{CSSNumericValue/parse()}} method allows a {{CSSNumericValue}}
You can’t perform that action at this time.
0 commit comments