Skip to content

Instantly share code, notes, and snippets.

@klgraham
Created March 26, 2016 04:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save klgraham/ff96f7c422a5b181db8b to your computer and use it in GitHub Desktop.
Save klgraham/ff96f7c422a5b181db8b to your computer and use it in GitHub Desktop.
func randomDouble() -> Double {
return Double(arc4random()) / Double(UInt32.max)
}
let uniform = Distribution<Double>(get: randomDouble)
uniform.sample(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment