Skip to content

Commit cc56baa

Browse files
authored
Merge pull request #221 from apasel422/tidy
Minor clarifications for last-N-touch credit
2 parents d73fbd3 + 853afaf commit cc56baa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

api.bs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,8 +1513,8 @@ To <dfn>validate {{AttributionConversionOptions}}</dfn> |options|:
15131513
1. If |options|.{{AttributionConversionOptions/value}}
15141514
is greater than |options|.{{AttributionConversionOptions/maxValue}},
15151515
throw a {{RangeError}}.
1516-
1. If |options|.{{AttributionConversionOptions}}.{{AttributionLogicOptions/credit}} [=map/exists=]:
1517-
1. Set |credit| to |options|.{{AttributionConversionOptions}}.{{AttributionLogicOptions/credit}}.
1516+
1. If |options|.{{AttributionConversionOptions/logicOptions}}.{{AttributionLogicOptions/credit}} [=map/exists=]:
1517+
1. Set |credit| to |options|.{{AttributionConversionOptions/logicOptions}}.{{AttributionLogicOptions/credit}}.
15181518
1. If |credit| is not a [=list=] or [=list/is empty=], throw a {{RangeError}}.
15191519
1. If any of the [=list/items=] of |credit| are less than or equal to 0, throw a {{RangeError}}.
15201520
1. If the [=list/size=] of |credit| exceeds an implementation-defined maximum, throw a {{RangeError}}.
@@ -1706,7 +1706,7 @@ To <dfn>fairly allocate credit</dfn>, given a [=list=] of doubles |credit| and a
17061706
1. Let |rawNormalizedCredit| be the result of element-wise dividing each [=list/item=] in |credit| by |sumCredit|.
17071707
1. Let |normalizedCredit| be |rawNormalizedCredit|, with each [=list/item=] rounded towards positive Infinity and converted to an integer.
17081708
1. Let |shuffledFractionalIndices| be [=list/get the indices|the indices=] of |credit|, ordered randomly.
1709-
1. [=list/remove|Remove=] any index |i| from |shuffledFractionalIndices| where |rawNormalizedCredit|[|i|] has no fractional part.
1709+
1. [=list/remove|Remove=] all indices |i| from |shuffledFractionalIndices| where |rawNormalizedCredit|[|i|] has no fractional part.
17101710
1. [=list/iterate|For each=] |index| of |shuffledFractionalIndices|:
17111711
1. If the sum of |normalizedCredit|'s [=list/items=] is equal to |value|, [=iteration/break=].
17121712
1. Decrement |normalizedCredit|[|index|] by 1.

0 commit comments

Comments
 (0)