/** * Returns a uniformly distributed random number in the open interval <tt>(from,to)</tt> (excluding <tt>from</tt> and * <tt>to</tt>). Pre conditions: <tt>from <= to</tt>. */ public float nextFloatFromTo(float from, float to) { return (float) nextDoubleFromTo(from, to); }
return from + (long) nextDoubleFromTo(0.0, to - from + 1); return from + (long) nextDoubleFromTo(0.0, diff); return ((i1 & 0xFFFFFFFFL) << 32) | (i2 & 0xFFFFFFFFL); random = Math.round(nextDoubleFromTo(Long.MIN_VALUE, to + 1)); if (random > to) { random = Long.MIN_VALUE; random = Math.round(nextDoubleFromTo(from - 1, to)); if (random < from) { random = to;
/** * Returns a uniformly distributed random number in the open interval <tt>(from,to)</tt> (excluding <tt>from</tt> and * <tt>to</tt>). Pre conditions: <tt>from <= to</tt>. */ public float nextFloatFromTo(float from, float to) { return (float) nextDoubleFromTo(from, to); }
/** * Returns a uniformly distributed random number in the open interval <tt>(from,to)</tt> (excluding <tt>from</tt> and * <tt>to</tt>). Pre conditions: <tt>from <= to</tt>. */ public float nextFloatFromTo(float from, float to) { return (float) nextDoubleFromTo(from, to); }
return from + (long) nextDoubleFromTo(0.0, to - from + 1); return from + (long) nextDoubleFromTo(0.0, diff); return ((i1 & 0xFFFFFFFFL) << 32) | (i2 & 0xFFFFFFFFL); random = Math.round(nextDoubleFromTo(Long.MIN_VALUE, to + 1)); if (random > to) { random = Long.MIN_VALUE; random = Math.round(nextDoubleFromTo(from - 1, to)); if (random < from) { random = to;
return from + (long) nextDoubleFromTo(0.0, to - from + 1); return from + (long) nextDoubleFromTo(0.0, diff); return ((i1 & 0xFFFFFFFFL) << 32) | (i2 & 0xFFFFFFFFL); random = Math.round(nextDoubleFromTo(Long.MIN_VALUE, to + 1)); if (random > to) { random = Long.MIN_VALUE; random = Math.round(nextDoubleFromTo(from - 1, to)); if (random < from) { random = to;