Here you can find the source of RandInRange(double start, double end)
Parameter | Description |
---|---|
start | a parameter |
end | a parameter |
public static double RandInRange(double start, double end)
//package com.java2s; //License from project: Open Source License public class Main { /**/* ww w. j ava2 s. c om*/ * Generates a random double from the start to the end provided, exclusive. * @param start * @param end * @return */ public static double RandInRange(double start, double end) { return Math.random() * (end - start) + start; } }