即均值为a,标准差为(sigma)的正态分布而言, 使用:(sigma)*random.nextGaussian()+a; 即可. 再具体使用时,注意自己算的是标准差还是方差。
Random r = new Random(); num = r.nextGaussian();