processing / p5.js

p5.js is a client-side JS platform that empowers artists, designers, students, and anyone to learn to code and express themselves creatively on the web. It is based on the core principles of Processing. http://twitter.com/p5xjs —
http://p5js.org/
GNU Lesser General Public License v2.1
21.74k stars 3.34k forks source link

curvePoint() Documentation incorrect #3321

Closed mzed closed 6 years ago

mzed commented 6 years ago

Nature of issue?

Most appropriate sub-area of p5.js?

Which platform were you using when you encountered this?

Details about the bug:

I’m pretty sure that the documentation for the curvePoint() function in p5.js is wrong. It is here: https://p5js.org/reference/#/p5/curvePoint

I think the parameters should be:

Parameters a Number: coordinate of first control point b Number: coordinate of first point on the curve c Number: coordinate of second point on the curve d Number: coordinate of second control point t Number: value between 0 and 1

So, the points on the curve are values 2 and 3, not 1 and 4. That would be more similar to the curve() function.

Here's an example: https://editor.p5js.org/kll/sketches/BJYFW_hTQ

The original processing documentation is inconsistent, too: https://processing.org/reference/curvePoint_.html

lmccart commented 6 years ago

fixed with https://github.com/processing/p5.js-website/commit/8e0c66b5a336b09d18042b1c494bb5cef5370f6a