diff --git a/ReturningValues/ReturningValues.pde b/ReturningValues/ReturningValues.pde index 8b13789..308c380 100644 --- a/ReturningValues/ReturningValues.pde +++ b/ReturningValues/ReturningValues.pde @@ -1 +1,11 @@ +void setup() { +} +void draw() { +println(Sum(5,12,15)); +} + +float Sum(float a, float b, float c){ +float d = a + b + c; +return d; +} \ No newline at end of file diff --git a/VoidFunctions/VoidFunctions.pde b/VoidFunctions/VoidFunctions.pde index 8b13789..60b7b53 100644 --- a/VoidFunctions/VoidFunctions.pde +++ b/VoidFunctions/VoidFunctions.pde @@ -1 +1,26 @@ +float x; +float y; +void setup() { +size(600,600); +background(0); +} +void draw() { + +DrawABlueSquare(); +DrawACircle(); +DrawARandomLine(); + +} +void DrawABlueSquare(){ +rect(width/2-25,height/2-25,50,50); +fill(0,0,255); +} +void DrawACircle(){ +ellipse(mouseX,mouseY,30,30); +} +void DrawARandomLine(){ +line(random(0,width), 0, random(0,width), height); +stroke(random(255), random(255), random(255)); +strokeWeight(.1); +} \ No newline at end of file