Blozi Posted April 20, 2015 Share Posted April 20, 2015 Wow this is definitely an interesting post. Scripters pay attention Quote Link to comment Share on other sites More sharing options...
SESH Posted April 20, 2015 Share Posted April 20, 2015 (edited) Here's one way of implementing this: public static int rand(int min, int max) { int n; int mean = (min + max) / 2; int std = (max - mean) / 3; Random r = new Random(); do { double val = r.nextGaussian() * std + mean; n = (int) Math.round(val); } while (n < min || n > max); return n; } Edited April 20, 2015 by SESH 1 Quote Link to comment Share on other sites More sharing options...