private static double randGaussian(double var, Random rng) {
		double res;
		double y;
		do {
			res = rng.nextDouble() * (2 * 6 * var) - (2 * 3 * var);
			y = rng.nextDouble();
		} while (G(res, var) > y);
		return res;
	}