Java Random Double randomDouble()

Here you can find the source of randomDouble()

Description

Generates random double value in range of 1.00 to 100.00 rounded to 2 decimal digits

License

Open Source License

Return

random double value in range of 1.00 to 100.00

Declaration

public static double randomDouble() 

Method Source Code

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

public class Main {
    /**/*from   w ww.  j a  va2  s .c  om*/
     * Generates random double value in range of 1.00 to 100.00 rounded to 2 decimal digits
     *
     * @return random double value in range of 1.00 to 100.00
     */
    public static double randomDouble() {
        return Math.round(Math.random() * 10000d) / 100d;
    }
}

Related

  1. randomColor(double d)
  2. randomDouble()
  3. randomDouble()
  4. randomDouble()
  5. randomDouble()
  6. randomDouble()
  7. randomDouble()
  8. randomDouble()
  9. randomDouble(double low, double high)