Here you can find the source of randomReal(float range)
public static float randomReal(float range)
//package com.java2s; //License from project: Open Source License import java.util.concurrent.ThreadLocalRandom; public class Main { public static float randomReal(float range) { ThreadLocalRandom rand = ThreadLocalRandom.current(); return (rand.nextFloat() - rand.nextFloat()) * range; }/*from www . jav a2s. co m*/ }