From 1a9bbb6159c34df3029c0d55944094afcc91b760 Mon Sep 17 00:00:00 2001 From: caminsha Date: Thu, 27 Feb 2020 23:10:20 +0100 Subject: [PATCH 1/5] added semicolon at the end of the line --- processing.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/processing.html.markdown b/processing.html.markdown index d99912e7..cf2dd77d 100644 --- a/processing.html.markdown +++ b/processing.html.markdown @@ -150,7 +150,7 @@ SomeRandomClass myObjectInstantiated = new SomeRandomClass(); // operations. float f = sq(3); // f = 9.0 float p = pow(3, 3); // p = 27.0 -int a = abs(-13) // a = 13 +int a = abs(-13); // a = 13 int r1 = round(3.1); // r1 = 3 int r2 = round(3.7); // r2 = 4 float sr = sqrt(25); // sr = 5.0 From 5d1c72515cbffc2e744c2ca2d500f75a3e74f1c3 Mon Sep 17 00:00:00 2001 From: caminsha Date: Thu, 27 Feb 2020 23:37:43 +0100 Subject: [PATCH 2/5] Added short explanation about break statement --- processing.html.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/processing.html.markdown b/processing.html.markdown index cf2dd77d..d0952e96 100644 --- a/processing.html.markdown +++ b/processing.html.markdown @@ -191,6 +191,8 @@ int i = 3; String value = (i > 5) ? "Big" : "Small"; // "Small" // Switch-case structure can be used to check multiple conditions concisely. +// It is important to use the break statement. If the `break`-statement does +// not exist the program executes all the following cases after a case was true. int value = 2; switch(value) { case 0: From d7de2446b770382689495406a4e725810a052e2f Mon Sep 17 00:00:00 2001 From: caminsha Date: Thu, 27 Feb 2020 23:38:03 +0100 Subject: [PATCH 3/5] removed an unnecesarry white space --- processing.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/processing.html.markdown b/processing.html.markdown index d0952e96..d7b0d600 100644 --- a/processing.html.markdown +++ b/processing.html.markdown @@ -211,7 +211,7 @@ switch(value) { // Iterative statements // For Statements - Again, the same syntax as in Java -for(int i = 0; i < 5; i ++){ +for(int i = 0; i < 5; i++){ print(i); // prints from 0 to 4 } From 48c193853c0a996d81d72c7bd861d6cdbfbc4103 Mon Sep 17 00:00:00 2001 From: caminsha Date: Sun, 1 Mar 2020 22:43:30 +0100 Subject: [PATCH 4/5] Changed color value in background function Changed it because we defined the color white as c before. --- processing.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/processing.html.markdown b/processing.html.markdown index d7b0d600..dbf078a2 100644 --- a/processing.html.markdown +++ b/processing.html.markdown @@ -356,7 +356,7 @@ color c = color(255, 255, 255); // WHITE! // By default, Processing uses RGB colour scheme but it can be configured to // HSB using colorMode(). Read more here: // (https://processing.org/reference/colorMode_.html) -background(color); // By now, the background colour should be white. +background(c); // By now, the background colour should be white. // You can use fill() function to select the colour for filling the shapes. // It has to be configured before you start drawing shapes so the colours gets // applied. From 80063a34ed85aaf5f3070a21e26754d16b1f9f59 Mon Sep 17 00:00:00 2001 From: caminsha Date: Sun, 1 Mar 2020 22:57:55 +0100 Subject: [PATCH 5/5] Changed color definition I have changed the color definition because 255, 255, 255 was not yellow. --- processing.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/processing.html.markdown b/processing.html.markdown index dbf078a2..777c6981 100644 --- a/processing.html.markdown +++ b/processing.html.markdown @@ -363,7 +363,7 @@ background(c); // By now, the background colour should be white. fill(color(0, 0, 0)); // If you just want to colour the outlines of the shapes then you can use // stroke() function. -stroke(255, 255, 255, 200); // stroke colour set to yellow with transparency +stroke(255, 255, 0, 200); // stroke colour set to yellow with transparency // set to a lower value. // Images