nature-of-code / noc-book

The Nature of Code book (archived repo, see README for new repo / build system!)
http://natureofcode.com
1.94k stars 365 forks source link

Chapter 1.4 - Java utils used for Random class not automatically imported in Processing 3 #121

Closed loeffe closed 5 years ago

loeffe commented 7 years ago

Chapter 1.4 states:

"Luckily for us, to use a normal distribution of random numbers in a Processing sketch, we don’t have to do any of these calculations ourselves. Instead, we can make use of a class known as Random, which we get for free as part of the default Java libraries imported into Processing"

I found this to be not the case in Processing 3.0 (Mac), where you have to manually import java.util.* library before using the Random class:

import java.util.*;