Java Random Double randomDouble()

Here you can find the source of randomDouble()

Description

random Double

License

Open Source License

Declaration

public static double randomDouble() 

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(System.currentTimeMillis());

    public static double randomDouble() {
        return random.nextDouble();
    }//ww w .j  a v a2s  .co m

    public static double randomDouble(long min, long max) {
        return min + (max - min) * random.nextDouble();
    }
}

Related

  1. randomChance(double chance)
  2. randomColor(double d)
  3. randomDouble()
  4. randomDouble()
  5. randomDouble()
  6. randomDouble()
  7. randomDouble()
  8. randomDouble()
  9. randomDouble()