Java Random Double randDouble(double min, double max)

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

Description

rand Double

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 rand = new Random();

    public static double randDouble(double min, double max) {
        //Random rand = new Random();
        rand.setSeed(System.currentTimeMillis());

        double randomNum = min + (rand.nextDouble() * ((max - min) + 1));

        return randomNum;
    }/*from w ww  .  j a v a2s .c om*/
}

Related

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