p5.js | Constants | HALF_PI

The HALF_PI is a mathematical constant and its value is 1.57079632679489661923. The HALF_PI is the half ratio of the circumference of a circle to its… Read More »

p5.js | tan() function

The tan() function in p5.js is used to calculate the tangent value of an angle in radians taken as the input parameter of the function.… Read More »

p5.js | quad() Function

The quad() function is an inbuilt function in p5.js which is used to draw a quadrilateral. A quadrilateral is a four-sided polygon. It function creates… Read More »

p5.js | concat() function

The concat() function in p5.js is used to concatenates the two given arrays. This function is depreciated from future versions and use First_array.concat(Second_array) instead. Syntax:… Read More »

p5.js | arrayCopy() function

The arrayCopy() function in p5.js is used to copy a part of source array elements to another destination array. This function is depreciated from future… Read More »

p5.js | max() function

The max() function in p5.js is used to get the maximum value among sequence of numbers or two given numbers. The max() function accepts any… Read More »

p5.js | alpha() function

The alpha() function in p5.js is used to extract the alpha value from a color or pixel array. Syntax: alpha(c) Parameters: The function accepts single… Read More »

p5.js | abs() function

The abs() function in p5.js is used to calculate the absolute value of a number. This function maps to the Math.abs() of javascript. A number’s… Read More »

p5.js | atan() Function

The atan() function in p5.js is used to calculate the inverse of tan() or arc tangent of a value ranging in between -Infinity to Infinity… Read More »

p5.js | lightness() function

The lightness() function in p5.js is used to extract the HSL lightness value from a color or pixel array. Syntax: lightness(c) Parameters: This function accepts… Read More »

p5.js | Constants | QUARTER_PI

The QUARTER_PI is a mathematical constant with the value 0.7853982. It is one quarter the ratio of the circumference of a circle to its diameter.… Read More »

p5.js | floor() function

The floor() function in p5.js is used to calculate the floor value of a number. This function maps to the Math.floor() of javascript. It calculates… Read More »

p5.js | sqrt() function

The sqrt() function in p5.js is used to get the square root of any input number. Syntax: sqrt(n) Parameters: This function accepts single parameter n… Read More »

p5.js | hue() function

The hue() function in p5.js is used to extract the HSB and HSL hue value from a color or pixel array. Syntax: hue(c) Parameters: This… Read More »

p5.js | ceil() function

The ceil() function in p5.js is used to calculate the ceil value of a number. This function maps to the Math.ceil() of javascript. A number’s… Read More »