Add a weightedRandom Function
Added a random and weightedRandom Functions
Removed duplicate code
Fixed a typo
Fixed some new lines
Fixed some vars and doc
Added array random and weightedRandom functions
Merge pull request #529 from aaschmitz/master

Added random and weightedRandom for array elements