diff --git a/src/core/shape/2d_primitives.js b/src/core/shape/2d_primitives.js index f916339514..b1f7d66ae5 100644 --- a/src/core/shape/2d_primitives.js +++ b/src/core/shape/2d_primitives.js @@ -110,7 +110,10 @@ p5.prototype._normalizeArcAngles = ( * * The fifth and sixth parameters, `start` and `stop`, set the angles * between which to draw the arc. Arcs are always drawn clockwise from - * `start` to `stop`. Angles are always given in radians. + * `start` to `stop`. The fifth and sixth parameters, start and stop, set the + * angles between which to draw the arc. Arcs are always drawn clockwise from + * start to stop. By default, angles are given in radians, but if angleMode + * (DEGREES) is set, the function interprets the values in degrees. * * The seventh parameter, `mode`, is optional. It determines the arc's fill * style. The fill modes are a semi-circle (`OPEN`), a closed semi-circle diff --git a/src/math/trigonometry.js b/src/math/trigonometry.js index cb2af7c709..686d180457 100644 --- a/src/math/trigonometry.js +++ b/src/math/trigonometry.js @@ -283,10 +283,12 @@ p5.prototype.atan2 = function(y, x) { * * `cos()` is useful for many geometric tasks in creative coding. The values * returned oscillate between -1 and 1 as the input angle increases. `cos()` - * takes into account the current <a href="#/p5/angleMode">angleMode()</a>. + * calculates the cosine of an angle, using radians by default or degrees if <a + * href="#/p5/angleMode">angleMode(DEGREES)</a> is set. * * @method cos - * @param {Number} angle the angle in radians unless specified by <a href="/reference/p5/angleMode/">angleMode()</a>. + * @param {Number} angle the angle, in radians by default or degrees + * if <a href="/reference/p5/angleMode/">angleMode(DEGREES)</a> is set. * @return {Number} cosine of the angle. * * @example @@ -363,10 +365,12 @@ p5.prototype.cos = function(angle) { * * `sin()` is useful for many geometric tasks in creative coding. The values * returned oscillate between -1 and 1 as the input angle increases. `sin()` - * takes into account the current <a href="#/p5/angleMode">angleMode()</a>. + * calculates the sine of an angle, using radians by default or degrees if <a + * href="#/p5/angleMode">angleMode(DEGREES)</a> is set. * * @method sin - * @param {Number} angle the angle in radians unless specified by <a href="/reference/p5/angleMode/">angleMode()</a>. + * @param {Number} angle the angle, in radians by default or degrees + * if <a href="/reference/p5/angleMode/">angleMode(DEGREES)</a> is set. * @return {Number} sine of the angle. * * @example @@ -443,11 +447,13 @@ p5.prototype.sin = function(angle) { * * `tan()` is useful for many geometric tasks in creative coding. The values * returned range from -Infinity to Infinity and repeat periodically as the - * input angle increases. `tan()` takes into account the current - * <a href="#/p5/angleMode">angleMode()</a>. + * input angle increases. `tan()` calculates the tan of an angle, using radians + * by default or degrees if <a + * href="#/p5/angleMode">angleMode(DEGREES)</a> is set. * * @method tan - * @param {Number} angle the angle in radians unless specified by <a href="/reference/p5/angleMode/">angleMode()</a>. + * @param {Number} angle the angle, in radians by default or degrees + * if <a href="/reference/p5/angleMode/">angleMode(DEGREES)</a> is set. * @return {Number} tangent of the angle. * * @example