curvePoint() documentation?

I’m pretty sure that the documentation for the curvePoint() function in p5.js is wrong. Am I crazy?

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.

looks like

https://p5js.org/reference/#/p5/curvePoint

https://processing.org/reference/curvePoint_.html

are different but both confused about this.

https://editor.p5js.org/kll/sketches/BJYFW_hTQ

Make sure to let the devs know :slight_smile: - https://github.com/processing/p5.js/issues?q=is%3Aopen+is%3Aissue+label%3Aarea%3Adocumentation

There’s now an issue here:

1 Like