Пример #1
0
 /**
  * Returns the next pseudo-random value from the generator. If the rotate parameter is true, then
  * the random number is rotated such that the midpoint of the first bin will fall at zero. e.g. If
  * there are eight bins, and the random number falls in the first bin, .0625 is subtracted from
  * the number. A modulus of 1 is then applied so that values will remain in the interval zero to
  * 1. This way, the values can be post-multiplied by tau=2*pi to get an angle.
  */
 @Override
 public Number getNext() {
   double val = emp.nextDouble();
   return rotate ? (1 + (val - inc)) % 1d : val;
 }