Activity 3.5.1.
Write a Java expression that returns a uniformly distributed
Hint.double
in the range [-1.0, 1.0).First multiply the range by a suitable scale factor, then shift by subtracting a suitable constant.
2.0 * rnd.nextDouble() - 1.0