prisonerjohn / processing-web

0 stars 0 forks source link

[CLOSED] random3D() isn't implemented in PJS. #125

Open prisonerjohn opened 10 years ago

prisonerjohn commented 10 years ago

Issue by aengelke Thursday May 09, 2013 at 17:47 GMT Originally opened as https://github.com/processing/processing-web/issues/125


Affected examples

Define random3D()(code copied from the PVector file)

PVector random3D() {
  float angle = random(0, 1)*TWO_PI;
  float vz = random(-1, 1);
  float vx = sqrt(1-vz*vz)*cos(angle);
  float vy = sqrt(1-vz*vz)*sin(angle);
  return new PVector(vx, vy, vz);
}

and change PVector.random3D(); to random3D();.

prisonerjohn commented 10 years ago

Comment by REAS Friday May 10, 2013 at 19:13 GMT


See issue processing/processing-web#131