Here you can find the source of randDouble(double min, double max)
Parameter | Description |
---|---|
min | The minimum value. |
max | The maximum value. |
public static double randDouble(double min, double max)
//package com.java2s; //License from project: Open Source License public class Main { /**/*ww w . java 2 s . c o m*/ * Get a random double within the provided range. * * @param min The minimum value. * @param max The maximum value. * @return A random double within the provided range. */ public static double randDouble(double min, double max) { return min + (Math.random() * ((max - min) + 1)); } }