Subscribed unsubscribe Subscribe Subscribe

random()

random()
random() \ Language (API) \ Processing 2+

set upper limit [ 0 to X ]
random(float:X);

set domain [ Xmini to Ymax ]
random(float:Xmini , float;Ymax);

upper limit [ 0 to 10 ]

for(int i=0; i<10; i++){
  float r = random(10);
  println(r);
}

set domain [ -10 to 10 ]

for(int i=0; i<10; i++){
  float r = random(-10,10);
  println(r);
}