Java Random Double randomDouble(int min, int max)

Here you can find the source of randomDouble(int min, int max)

Description

random Double

License

Mozilla Public License

Declaration

public static double randomDouble(int min, int max) 

Method Source Code

//package com.java2s;
/*//from  w w  w.j  a v  a2  s .  com
 * Copyright ? 2013 VillageReach. All Rights Reserved. This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
 *
 * If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

import java.util.Random;

public class Main {
    final static Random random = new Random();

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

Related

  1. randomDouble()
  2. randomDouble(double low, double high)
  3. randomDouble(double min, double max)
  4. randomDouble(double min, double max)
  5. randomDouble(double min, double max)
  6. randomDouble(int start, int end)
  7. randomDoubleArray(final int mDimensionality)
  8. randomDoubleArray(int len)
  9. randomDoubleBetween(double a, double b)