Skip to content

Commit 4adc5dd

Browse files
committed
Fix: Update sin(), cos(), and tan() docs to respect angleMode.
1 parent 8e090ea commit 4adc5dd

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/math/trigonometry.js

+10-7
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,11 @@ function trigonometry(p5, fn){
286286
*
287287
* `cos()` is useful for many geometric tasks in creative coding. The values
288288
* returned oscillate between -1 and 1 as the input angle increases. `cos()`
289-
* takes into account the current <a href="#/p5/angleMode">angleMode()</a>.
289+
* calculates the cosine of an angle, using radians by default, or according
290+
* to if <a href="/reference/p5/angleMode/">angleMode()</a> setting (RADIANS or DEGREES).
290291
*
291292
* @method cos
292-
* @param {Number} angle the angle in radians unless specified by <a href="/reference/p5/angleMode/">angleMode()</a>.
293+
* @param {Number} angle the angle, in radians by default, or according to if <a href="#/p5/angleMode">angleMode()</a> setting (RADIANS or DEGREES).
293294
* @return {Number} cosine of the angle.
294295
*
295296
* @example
@@ -366,10 +367,11 @@ function trigonometry(p5, fn){
366367
*
367368
* `sin()` is useful for many geometric tasks in creative coding. The values
368369
* returned oscillate between -1 and 1 as the input angle increases. `sin()`
369-
* takes into account the current <a href="#/p5/angleMode">angleMode()</a>.
370+
* calculates the sine of an angle, using radians by default, or according to
371+
* if <a href="#/p5/angleMode">angleMode()</a> setting (RADIANS or DEGREES).
370372
*
371373
* @method sin
372-
* @param {Number} angle the angle in radians unless specified by <a href="/reference/p5/angleMode/">angleMode()</a>.
374+
* @param {Number} angle the angle, in radians by default, or according to if <a href="/reference/p5/angleMode/">angleMode()</a> setting (RADIANS or DEGREES).
373375
* @return {Number} sine of the angle.
374376
*
375377
* @example
@@ -446,11 +448,12 @@ function trigonometry(p5, fn){
446448
*
447449
* `tan()` is useful for many geometric tasks in creative coding. The values
448450
* returned range from -Infinity to Infinity and repeat periodically as the
449-
* input angle increases. `tan()` takes into account the current
450-
* <a href="#/p5/angleMode">angleMode()</a>.
451+
* input angle increases. `tan()` calculates the tan of an angle, using radians
452+
* by default, or according to
453+
* if <a href="#/p5/angleMode">angleMode()</a> setting (RADIANS or DEGREES).
451454
*
452455
* @method tan
453-
* @param {Number} angle the angle in radians unless specified by <a href="/reference/p5/angleMode/">angleMode()</a>.
456+
* @param {Number} angle the angle, in radians by default, or according to if <a href="/reference/p5/angleMode/">angleMode()</a> setting (RADIANS or DEGREES).
454457
* @return {Number} tangent of the angle.
455458
*
456459
* @example

0 commit comments

Comments
 (0)