Java Random random(float min, float max)

Here you can find the source of random(float min, float max)

Description

random

License

Open Source License

Declaration

private static float random(float min, float max) 

Method Source Code

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

import java.util.*;

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

    private static float random(float min, float max) {
        final float d = max - min;
        return min + d * r.nextFloat();
    }//from  ww  w  . j  ava 2  s .  c  o  m
}

Related

  1. random()
  2. random()
  3. random()
  4. random(E[] elements)
  5. random(final char[] chars)
  6. random(float theStart, float theEnd)
  7. random(int min, int max)
  8. random(List list, Random random)
  9. random4DigitNumber()