From 54a35f70c5ec5f7ba1fbb7b45e81ef487f0854b3 Mon Sep 17 00:00:00 2001 From: nli17 Date: Fri, 4 Dec 2015 14:03:23 -0500 Subject: [PATCH 1/3] functions --- VoidFunctions/VoidFunctions.pde | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) 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 From afd9b85c7f0d688c2bda9fabdf69977d94d0f27d Mon Sep 17 00:00:00 2001 From: nli17 Date: Fri, 4 Dec 2015 14:49:51 -0500 Subject: [PATCH 2/3] Celsius to Kelvin --- ReturningValues/ReturningValues.pde | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ReturningValues/ReturningValues.pde b/ReturningValues/ReturningValues.pde index 8b13789..48c0cce 100644 --- a/ReturningValues/ReturningValues.pde +++ b/ReturningValues/ReturningValues.pde @@ -1 +1,13 @@ +void setup() { + size(800, 600); +} + +void draw() { + CtoK() + +} +float CtoK(float C){ + + +} \ No newline at end of file From 3805579391b83dde00cd29c9eff6a22a5b47a409 Mon Sep 17 00:00:00 2001 From: nli17 Date: Tue, 8 Dec 2015 14:07:45 -0500 Subject: [PATCH 3/3] c to k --- ReturningValues/ReturningValues.pde | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/ReturningValues/ReturningValues.pde b/ReturningValues/ReturningValues.pde index 48c0cce..02b8d98 100644 --- a/ReturningValues/ReturningValues.pde +++ b/ReturningValues/ReturningValues.pde @@ -1,13 +1,8 @@ - -void setup() { - size(800, 600); -} - void draw() { - CtoK() - + println(findKelvin(25)); } -float CtoK(float C){ - +float findKelvin (float celsius){ + float kelvin= celsius+273; + return kelvin; } \ No newline at end of file