Java tutorial
//package com.java2s; // Licensed under the Apache License, Version 2.0 (the "License"); public class Main { /** * Returns a random number between 0 and f. */ public static float random(float f) { return ((float) Math.random()) * f; } }