Java ThreadLocalRandom getRandomDouble(double a, double b)

Here you can find the source of getRandomDouble(double a, double b)

Description

get Random Double

License

Open Source License

Declaration

public static double getRandomDouble(double a, double b) 

Method Source Code

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

import java.util.concurrent.ThreadLocalRandom;

public class Main {
    public static double getRandomDouble(double a, double b) {
        if (a == b)
            return a;
        return ThreadLocalRandom.current().nextDouble(a, b);
    }/*from w  ww . java 2  s  . c o m*/
}

Related

  1. getRandom()
  2. getRandom(int p)
  3. getRandom8()
  4. getRandomBetween(int min, int max)
  5. getRandomBoundedInt(int bound)
  6. getRandomElement(E[] array)
  7. getRandomElement(List elements)
  8. getRandomFloat()
  9. getRandomId(@Nonnull Random random, int length)