functional static method

num functional(
  1. num p,
  2. num start,
  3. num end, {
  4. required ProbabilityScale scale,
})

The inverse cummulative distribution of a random variable that is non-uniformly distributed in the interval [start, end].

  • Returns a value that lies in the interval start...end.
  • p: A probability with value 0...1.
  • scale: A function of typedef ProbabilityScale.

Implementation

static num functional(
  num p,
  num start,
  num end, {
  required ProbabilityScale scale,
}) {
  return start + scale(p) * (end - start);
}