Java tutorial
//package com.java2s; public class Main { public static float random(float min, float max) { return (float) (Math.random() * (max - min) + min); } }