Here you can find the source of Rand()
public static float Rand()
//package com.java2s; // it under the terms of the GNU General Public License as published by public class Main { public static float Rand() { final float ra; ra = (float) (Math.random() - 0.5); return (ra); }/*from w w w . j a v a 2s . co m*/ }