update method
Implementation
void update(double speed) {
z -= speed;
if (z < 1) {
z = width;
x = random.nextDouble() * width * 2 - width;
y = random.nextDouble() * height * 2 - height;
pz = z;
}
}
void update(double speed) {
z -= speed;
if (z < 1) {
z = width;
x = random.nextDouble() * width * 2 - width;
y = random.nextDouble() * height * 2 - height;
pz = z;
}
}