Java Random Double randDouble(double min, double max)

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

Description

rand Double

License

Apache License

Declaration

public static double randDouble(double min, double max) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Random;

public class Main {
    public static double randDouble(double min, double max) {
        Random rnd = new Random();
        return rnd.nextDouble() * (max - min) + min;
    }/*  w w w  .  j a va2 s.  c o m*/

    public static double randDouble(double min, double max, Random rnd) {
        return rnd.nextDouble() * (max - min) + min;
    }
}

Related

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