The TAU is a mathematical constant and it is the alias of TWO_PI. The value of TAU is 6.28318530717958647693. It is twice the ratio of the circumference of a circle to its diameter.
Syntax:
TAU
Below program illustrates the usage of TAU in p5.js:
Example: This example illustrates the TAU constant.
function setup() {
createCanvas(880, 300);
}
function draw() {
background(220);
stroke(255, 204, 0);
strokeWeight(4);
arc(180, 50, 280, 280, 0, TAU/2);
noStroke();
textSize(20);
text( "Value of TAU is " + TAU, 30, 230);
}
|
Output:

Reference: https://p5js.org/reference/#/p5/TAU