Java Random Double randDouble(double min, double max)

Here you can find the source of randDouble(double min, double max)

Description

Return a uniformly distributed variable in the interval [min, max).

License

Open Source License

Declaration

public static double randDouble(double min, double max) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Random;

public class Main {
    private static Random random = new Random();

    /**/*from  www  .  j a  v  a 2 s .  c  om*/
     * Return a uniformly distributed variable in the interval [min, max).
     */
    public static double randDouble(double min, double max) {
        return random.nextDouble() * (max - min) + min;
    }
}

Related

  1. getRandomDouble(double min, double max)
  2. rand(double seed)
  3. randDouble()
  4. randDouble(double min, double max)
  5. randDouble(double min, double max)
  6. randDouble(double min, double max)
  7. randDouble(int m, int n)
  8. randIn(double min, double max)
  9. RandInRange(double start, double end)