We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Im trying to make a random number that is a non-decimal between (2,300) however It doesn't let me because float can't convert to int. Anyone know how to do this?
int rnd = (int) random(2, 300); https://Processing.org/reference/random_.html
int rnd = (int) random(2, 300);
Or int rnd = int(random(2, 300)); as it is recommended in processing..
int rnd = int(random(2, 300));
Answers
int rnd = (int) random(2, 300);
https://Processing.org/reference/random_.html
Or
int rnd = int(random(2, 300));
as it is recommended in processing..