Esta função retorna verdadeiro com base em uma chance percentual entre 0 e 100. Por exemplo, ao passar 30, há aproximadamente 30% de chance de retornar verdadeiro.
Function
Section titled “Function” Name: IsChance Copied!
Aliases: Chance Copied!
Parameters
Section titled “Parameters”Representa um número de ponto flutuante de precisão dupla (15-16 dígitos). | chance; | // o valor da chance. |
Examples
Section titled “Examples”//Default example:
IsChance[chance]
//Using aliases:
Chance[chance]
//Other examples:
IsChance[10] // It contains 10% chance of returning true.
IsChance[60]