chance method

bool chance (
  1. double chance,
  2. double maxChances
)

Calculates 'chance' out of 'max chances'. Example: 1 chance out of 3 chances (or 33.3%)

  • chance a chance proportional to maxChances.
  • maxChances a maximum number of chances