diff --git a/ReturningValues/ReturningValues.pde b/ReturningValues/ReturningValues.pde index 8b13789..91eb3cd 100644 --- a/ReturningValues/ReturningValues.pde +++ b/ReturningValues/ReturningValues.pde @@ -1 +1,8 @@ +float FtoC(float F) { + float C = (F-32)*.555555555556; + return C; +} +void draw() { + println(FtoC(212)); +} \ No newline at end of file diff --git a/VoidFunctions/VoidFunctions.pde b/VoidFunctions/VoidFunctions.pde index 8b13789..c60f4ce 100644 --- a/VoidFunctions/VoidFunctions.pde +++ b/VoidFunctions/VoidFunctions.pde @@ -1 +1,33 @@ +void setup() { + size(800, 600); + noStroke(); + frameRate(1000000000); + textAlign(CENTER,CENTER); + textSize(20); +} +void draw() { + blueSquare(); + mouseCircles(random(255), random(255), random(255)); + keyText(); +} + +void blueSquare(){ + rectMode(CENTER); + fill(0,0,255); + rect(width/2,height/2,50,50); +} + +void mouseCircles(float r, float g, float b) { + if (mousePressed) { + fill(r, g, b); + ellipse(mouseX, mouseY, 30, 30); + } +} + +void keyText(){ + if(keyPressed){ + fill(0); + text("ayy lmao", random(width), random(height)); + } +} \ No newline at end of file