Skip to content

Instantly share code, notes, and snippets.

@3n
Created November 19, 2008 21:03
Show Gist options
  • Save 3n/26717 to your computer and use it in GitHub Desktop.
Save 3n/26717 to your computer and use it in GitHub Desktop.
function coin_toss(prob){
return Math.random() > 1 - (prob || 0.5)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment