The Probability Density/Mass Function (PDF/PMF).
Returns the probability of the distribution at x.
x
@override double probability(double x) => a <= x && x <= b ? 1 / (b - a) : 0;