Here you can find the source of randomBoth(double range)
public static double randomBoth(double range)
//package com.java2s; //License from project: Open Source License public class Main { public static double randomBoth(double range) { return (Math.random() * range * 2.0) - range; }/*from w w w .ja va 2 s . c om*/ }