Computes the quantile (inverse CDF) for the given probability p.
Because the CDF is linear, the quantile is a simple linear interpolation between min and max.
the value x at which cdf(x) = p.
cdf(x) = p
the cumulative probability, must be in [0, 1].
[0, 1]