public static float random(float f){
  return ((float)Math.random()) * f;
}

public static float random ( float f ) { return ( ( float ) Math . random ( ) ) * f ; }
returns a random number between 0 and f .
