is there a difference between the randomGaussian() function in processing, and the nextGaussian() in the java.util class?
1 Like
see
https://github.com/processing/processing/blob/master/core/src/processing/core/PApplet.java#L5149 ,
also what did your read or try already:
// https://discourse.processing.org/t/difference-between-randomgaussian-and-nextgaussian/14008
// https://processing.org/reference/randomGaussian_.html
// https://www.tutorialspoint.com/java/util/random_nextgaussian.htm
// https://www.tutorialspoint.com/java/util/java_util_random.htm
import java.util.*;
Random randomno = new Random();
float x, y;
void setup() {
background(200,200,0);
stroke(200,0,0);
}
void draw() {
translate( width/2, height/2);
x = (float)randomno.nextGaussian();
y = randomGaussian();
point(10*x, 10*y);
}
so the difference actually is the double / float default usage of JAVA / Processing
4 Likes
thank you! that cleared things out