prisonerjohn / processing-web

0 stars 0 forks source link

[CLOSED] PVector.rotate() isn't implemented in PJS. #129

Open prisonerjohn opened 10 years ago

prisonerjohn commented 10 years ago

Issue by aengelke Thursday May 09, 2013 at 18:10 GMT Originally opened as https://github.com/processing/processing-web/issues/129


Affected examples

Define rotatePVector() (copied from PVector.java)

void rotatePVector(PVector vec, float theta) {
  float xTemp = vec.x;
  vec.x = vec.x*cos(theta) - vec.y*sin(theta);
  vec.y = xTemp*sin(theta) + vec.y*cos(theta);
}

and change v.rotate(...) to rotatePVector(v, ...).

prisonerjohn commented 10 years ago

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


See issue processing/processing-web#131