Functions and return
5.3: Functions and Return - p5.js Tutorial
Code for this video.
The Random() returns a value that you can use.
The Ellipse() command does not.
function NAME ( PARAMETERS, ARGUMENTS) {
//code for your function goes here
// declare and use a new variable in here.
return (that new variable goes here);
}
Here he explains degrees and radians.
Code for this video.
The Random() returns a value that you can use.
The Ellipse() command does not.
function NAME ( PARAMETERS, ARGUMENTS) {
//code for your function goes here
// declare and use a new variable in here.
return (that new variable goes here);
}
Here he explains degrees and radians.