Lines Matching defs:origin

96     static final String BadRange = "bound must be greater than origin";
237 * origin is greater than bound, acts as unbounded form of
240 * @param origin the least value, unless greater than bound
241 * @param bound the upper bound (exclusive), must not equal origin
244 final long internalNextLong(long origin, long bound) {
246 if (origin < bound) {
247 long n = bound - origin, m = n - 1;
249 r = (r & m) + origin;
255 r += origin;
258 while (r < origin || r >= bound)
271 * @param origin the least value, unless greater than bound
272 * @param bound the upper bound (exclusive), must not equal origin
275 final int internalNextInt(int origin, int bound) {
276 if (origin < bound) {
277 int n = bound - origin;
279 return nextInt(n) + origin;
285 } while (r < origin || r >= bound);
297 * @param origin the least value, unless greater than bound
298 * @param bound the upper bound (exclusive), must not equal origin
301 final double internalNextDouble(double origin, double bound) {
303 if (origin < bound) {
304 r = r * (bound - origin) + origin;
650 * origin (inclusive) and bound (exclusive).
653 * calling the following method with the origin and bound:
655 * int nextInt(int origin, int bound) {
656 * int n = bound - origin;
658 * return nextInt(n) + origin;
664 * } while (r < origin || r >= bound);
670 * @param randomNumberOrigin the origin (inclusive) of each random value
673 * each with the given origin (inclusive) and bound (exclusive)
693 * int} values, each conforming to the given origin (inclusive) and bound
697 * calling the following method with the origin and bound:
699 * int nextInt(int origin, int bound) {
700 * int n = bound - origin;
702 * return nextInt(n) + origin;
708 * } while (r < origin || r >= bound);
716 * @param randomNumberOrigin the origin (inclusive) of each random value
719 * each with the given origin (inclusive) and bound (exclusive)
777 * pseudorandom {@code long}, each conforming to the given origin
781 * of calling the following method with the origin and bound:
783 * long nextLong(long origin, long bound) {
785 * long n = bound - origin, m = n - 1;
787 * r = (r & m) + origin;
793 * r += origin;
796 * while (r < origin || r >= bound)
803 * @param randomNumberOrigin the origin (inclusive) of each random value
806 * each with the given origin (inclusive) and bound (exclusive)
826 * long} values, each conforming to the given origin (inclusive) and bound
830 * of calling the following method with the origin and bound:
832 * long nextLong(long origin, long bound) {
834 * long n = bound - origin, m = n - 1;
836 * r = (r & m) + origin;
842 * r += origin;
845 * while (r < origin || r >= bound)
854 * @param randomNumberOrigin the origin (inclusive) of each random value
857 * each with the given origin (inclusive) and bound (exclusive)
917 * pseudorandom {@code double} values, each conforming to the given origin
921 * of calling the following method with the origin and bound:
923 * double nextDouble(double origin, double bound) {
925 * r = r * (bound - origin) + origin;
932 * @param randomNumberOrigin the origin (inclusive) of each random value
935 * each with the given origin (inclusive) and bound (exclusive)
956 * double} values, each conforming to the given origin (inclusive) and bound
960 * of calling the following method with the origin and bound:
962 * double nextDouble(double origin, double bound) {
964 * r = r * (bound - origin) + origin;
973 * @param randomNumberOrigin the origin (inclusive) of each random value
976 * each with the given origin (inclusive) and bound (exclusive)
992 * versions into one class by treating a bound less than origin as
1002 final int origin;
1005 int origin, int bound) {
1007 this.origin = origin; this.bound = bound;
1013 new RandomIntsSpliterator(rng, i, index = m, origin, bound);
1029 consumer.accept(rng.internalNextInt(origin, bound));
1042 int o = origin, b = bound;
1057 final long origin;
1060 long origin, long bound) {
1062 this.origin = origin; this.bound = bound;
1068 new RandomLongsSpliterator(rng, i, index = m, origin, bound);
1084 consumer.accept(rng.internalNextLong(origin, bound));
1097 long o = origin, b = bound;
1113 final double origin;
1116 double origin, double bound) {
1118 this.origin = origin; this.bound = bound;
1124 new RandomDoublesSpliterator(rng, i, index = m, origin, bound);
1140 consumer.accept(rng.internalNextDouble(origin, bound));
1153 double o = origin, b = bound;