This project is read-only.
The WeightedList is used for getting random values from a predefined, weighted list of values. It is a generic list and is able to hold each class type.

Here's an little example with Integers:
  • Weight: 25.0f Value: 1
  • Weight: 25.0f Value: 2
  • Weight: 50.0f Value: 3

When you get random values from the WeightedList by using the RandomValue property there's a 25% chance (1 of 4) of getting a value of 1 or 2 each and a 50% chance (2 of 4) of getting a value of 3.

Please not that a random generate does not evenly distribute the random values per definition.

Last edited Dec 8, 2010 at 9:58 AM by Glatzemann, version 1


No comments yet.