Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions ReturningValues/ReturningValues.pde
Original file line number Diff line number Diff line change
@@ -1 +1,35 @@
PImage jon;

int time;

void setup(){
size(480, 480);

jon = loadImage("jon.png");
imageMode(CENTER);
}

void draw(){
time = randomJon(time);
}

int randomJon(int col){
col++;

tint(col % 255, 0, 255 - (col % 255));

image(jon, random(width), random(height));

println(pythag(col % 255, 255 - (col % 255)));
println(addnums(1, 2, 3));

return col;
}

float pythag(float a, float b){
return sqrt(pow(a,2)+pow(b,2));
}

float addnums(float n1, float n2, float n3){
return n1+n2+n3;
}
Binary file added ReturningValues/data/jon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.