Weighted Random

Pass in a
Posted by Scripts on 2022-08-14 21:43:18
License Type
License Type
Freeware
Description
Weighted random is a CFC that I created to use for the CFSudoku project. The main function of this CFC is to allow a developer to pass in an structure of values and their "weight". The weight structure is then used to build a weight array. The length of the array is equal to the sum of weights and the corresponding value is stored in each array element. RandRange() is then used to get a random array key and the corresponding value is returned as the weighted random value.
Author

ssekora

Ratings & Review
Uh oh! We couldn't find any review for this listing.
Post Review
License Type
License Type
Freeware