Format draw()
This commit is contained in:
parent
0bf2cf38fe
commit
2e8cb81016
@ -136,7 +136,10 @@ export class ProbabilityObjectArray<K, V = undefined> extends Array<ProbabilityO
|
|||||||
*/
|
*/
|
||||||
public draw(count = 1, replacement = true, locklist: Array<K> = []): K[]
|
public draw(count = 1, replacement = true, locklist: Array<K> = []): K[]
|
||||||
{
|
{
|
||||||
if (this.length === 0) return [];
|
if (this.length === 0)
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
const { probArray, keyArray } = this.reduce((acc, x) =>
|
const { probArray, keyArray } = this.reduce((acc, x) =>
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user