Here you can find the source of randFloat(float min, float max)
public static float randFloat(float min, float max)
//package com.java2s; //License from project: Open Source License import java.util.Random; public class Main { private static Random random = new Random(); public static float randFloat(float min, float max) { return random.nextFloat() * (max - min) + min; }//from w w w .j a v a 2 s . c o m }