Constructor new WeightedRandomSelector() Source: p5ex.mjs, line 383 Methods clear() Clears all elements. Source: p5ex.mjs, line 408 get() Returns one element randomly. The probability for each element is: (probability weight of the element) / (total probability weight) Source: p5ex.mjs, line 419 push(element, probabilityWeight) Adds one element with provided weight of probability. Source: p5ex.mjs, line 395 Parameters: Name Type Description element probabilityWeight