/** * Calculates a normal distributed value (using the polar method). * * <code>nextGuassian(1,1)</code> is equivalent to {@link #nextGaussian()}. * * @param mean the mean value of the distribution * @param stdDev the standard deviation of the distribution * * @return The value */ public double nextGaussian(double mean, double stdDev) { return mean + stdDev * nextGaussian(); } }