create functions
Defining functions
Believe me, you are already familiar with defining functions without knowing it. When we call draw or setup in our sketch, this is exactly what we do: Defining a function.
returnType | function-name | parameter | content |
---|---|---|---|
void | draw | () | { } |
void | setup | () | { } |
When we want to create our own functions for any reason, we use exactly the same structure as we do it when we define setup and draw.
returnType | function-name | parameter | content |
---|---|---|---|
void | something | () | { } |
float | something | () | { } |
int | something | () | { } |
string | something | () | { } |
firing a function
rect();
sin();
noise();
move();
display();