diff --git a/ReturningValues/ReturningValues.pde b/ReturningValues/ReturningValues.pde index 8b13789..0e35df7 100644 --- a/ReturningValues/ReturningValues.pde +++ b/ReturningValues/ReturningValues.pde @@ -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; +} \ No newline at end of file diff --git a/ReturningValues/data/jon.png b/ReturningValues/data/jon.png new file mode 100644 index 0000000..86b5db3 Binary files /dev/null and b/ReturningValues/data/jon.png differ