roundFair
roundFair(number, random) ⇒ int
Performs a probabilistic rounding where a fraction is rounded up or down with probability equal to the fraction
Kind: global function
Param | Type |
---|---|
number | number |
random | function |
int
Performs a probabilistic rounding where a fraction is rounded up or down with probability equal to the fraction
Kind: global function
Param | Type |
---|---|
number | number |
random | function |