Skip to content

Tag Archives: JavaScript-p5.js

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
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
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
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
The green() function in p5.js is used to extract the green value from a color or pixel array. Syntax: green(c) Parameters: This function accepts single… Read More
The acos() function in p5.js is used to calculate the arc cosine value. The domain of this function is -1 to +1 and the range… Read More
The sin() function in p5.js is used to calculate the sine value of an angle in radians taken as the input parameter of the function… Read More
The brightness() function in p5.js is used to extract the HSB brightness value from a color or pixel array. Syntax: brightness(c) Parameters: This function accepts… Read More
The asin() function in p5.js is used to calculate the inverse of sine (arc sine). If the input value range is -1 to 1 then… Read More
The cos() function in p5.js is used to calculate the cosine value of an angle (taken in radian) as input parameter of the function and… Read More
The PI is a mathematical constant with the value 3.14159265358979323846. It is the circumference’s ratio of a circle to its diameter. Syntax PI Below program… Read More
The round() function in p5.js is used to calculate the round value of a number. It calculates the integer closest to the number. Syntax round(number)… Read More
The red() function in p5.js is used to extract the red value from a color or pixel array. Syntax: red(c) Parameters: This function accepts single… Read More
The log() function in p5.js is used to get the natural logarithm (of base “e”) of any number taken as input for the parameter of… Read More
The sq() function in p5.js is used to calculate the square value of a number. The square of a number is always positive. Syntax sq(number)… Read More

Start Your Coding Journey Now!