diff --git a/ReturningValues/ReturningValues.pde b/ReturningValues/ReturningValues.pde index 8b13789..02b8d98 100644 --- a/ReturningValues/ReturningValues.pde +++ b/ReturningValues/ReturningValues.pde @@ -1 +1,8 @@ +void draw() { + println(findKelvin(25)); +} +float findKelvin (float celsius){ + float kelvin= celsius+273; + return kelvin; +} \ No newline at end of file diff --git a/VoidFunctions/VoidFunctions.pde b/VoidFunctions/VoidFunctions.pde index 8b13789..a197a35 100644 --- a/VoidFunctions/VoidFunctions.pde +++ b/VoidFunctions/VoidFunctions.pde @@ -1 +1,27 @@ +float red = 100; +float green = 0; +float blue = 255; +void setup() { + size(800, 600); + noStroke(); +} +void draw() { + background(255); + blueSquare(); + circleAtMouse(255,200,5); + drawACircleAt(mouseX, height/2, 10); +} +void drawACircleAt(float x, float y, float d){ + ellipse(x,y,d,d); +} + +void circleAtMouse(float red, float green, float blue){ + fill(red, green, blue); + ellipse(mouseX, mouseY, 50,50); +} + +void blueSquare() { + fill(0, 100, 255); + rect(width/2, height/2, 50,50); +} \ No newline at end of file