check static method

void check(
  1. num probability
)

Implementation

static void check(num probability) {
  if (probability < 0 || 1 < probability) {
    throw InvalidProbability(probability);
  }
}