Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App

Related Articles

p5.js | Constants | TAU

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

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.



Below program illustrates the usage of TAU in p5.js:

Example: This example illustrates the TAU constant.

function setup() {
    // Create Canvas of size 880*300
    createCanvas(880, 300);
function draw() {
    //Set the background Color
    //Set the stroke color
    stroke(255, 204, 0);
    //Set the stroke weight
    // Use of constant TAU
    arc(180, 50, 280, 280, 0, TAU/2); 
    // Set the font size
    // Display result
    text("Value of TAU is "+ TAU, 30, 230);



My Personal Notes arrow_drop_up
Last Updated : 12 Apr, 2019
Like Article
Save Article
Similar Reads
Related Tutorials