From c619c4da648ade8a945c79e44dd6bac08fa9ad7f Mon Sep 17 00:00:00 2001 From: Stefan Karner Date: Mon, 11 Feb 2019 16:01:25 +0100 Subject: [PATCH] Unify whitespace in arithmetic expressions --- intoOurSun_Code/intoOurSun_Code.pde | 48 ++++++++++++++--------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/intoOurSun_Code/intoOurSun_Code.pde b/intoOurSun_Code/intoOurSun_Code.pde index 4ed9e08..0a073e0 100644 --- a/intoOurSun_Code/intoOurSun_Code.pde +++ b/intoOurSun_Code/intoOurSun_Code.pde @@ -57,15 +57,15 @@ void setup() { myRemoteLocation = new NetAddress("127.0.0.1", 12000); // change IP and port here if needed frameRate(60); - rate = abs(int(sthmap+stwmap+2)); + rate = abs(int(sthmap + stwmap + 2)); table = loadTable("anno_labs_pages_dropped_width_height_year.csv", "header"); } void draw() { - step =abs(sin(frameCount*0.0001))*9; - counter=counter+int(step); + step = abs(sin(frameCount * 0.0001)) * 9; + counter += int(step); println(int(step)); if (counter >= 1000000) { counter = 0; @@ -82,15 +82,15 @@ void draw() { sphW = map(table.getInt(counter, 0), 1000, 5000, 1, 10 ); sphH = map(table.getInt(counter, 1), 1700, 4000, 1, 10 ); - for (int y=0; y < height-200; y +=0) { - for ( int x=0; x < width; x += 0) { + for (int y = 0; y < height - 200; y += 0) { + for ( int x = 0; x < width; x += 0) { fill( int(random(wmap, 255)), int(random(0, hmap)), int(random(wmap, hmap))); fill( int(random(0, wmap)), int(random(0, hmap)), int(random(wmap, hmap))); noStroke(); rect(x, y, 20, 20); - x+=20; + x += 20; } - y+=20; + y += 20; } pushMatrix(); @@ -117,7 +117,7 @@ void draw() { OscMessage myMessage2 = new OscMessage("/height"); noStroke(); fill(0); - rect(width/2, height-100, width, 200); + rect(width / 2, height - 100, width, 200); fill(255); textAlign(CENTER, CENTER); @@ -129,19 +129,19 @@ void draw() { translate(0, 300); - text(W, width/2-100, height/2); - text(H, width/2+100, height/2); - text(i, width/2-300, height/2); - text(y, width/2+300, height/2); + text(W, width / 2 - 100, height / 2); + text(H, width / 2 + 100, height / 2); + text(i, width / 2 - 300, height / 2); + text(y, width / 2 + 300, height / 2); textSize(25); - text("WIDTH:", width/2-100, height/2-50); - text("HEIGHT:", width/2+100, height/2-50); + text("WIDTH:", width / 2 - 100, height / 2 - 50); + text("HEIGHT:", width / 2 + 100, height / 2 - 50); - text("ID:", width/2-300, height/2-50); - text("YEAR:", width/2+300, height/2-50); + text("ID:", width / 2 - 300, height / 2 - 50); + text("YEAR:", width / 2 + 300, height / 2 - 50); - val = (table.getInt(counter, 0) *table.getInt(counter, 1))/10000; + val = (table.getInt(counter, 0) * table.getInt(counter, 1)) / 10000; noFill(); stroke(255); @@ -157,8 +157,8 @@ void sun() { fill(random(255), random(255), random(255)); stroke(random(255), random(255), random(255)); - strokeWeight(ymap/5); - ellipse(width/2, 284, (wmap+hmap)*0.9, (wmap+hmap)*0.9); + strokeWeight(ymap / 5); + ellipse(width / 2, 284, (wmap + hmap) * 0.9, (wmap + hmap) * 0.9); } @@ -171,7 +171,7 @@ void flick1() { } //println(rate); rectMode(CENTER); - rect(width/2, 426, width, 284); + rect(width / 2, 426, width, 284); } @@ -183,14 +183,14 @@ void flick2() { noFill(); } rectMode(CENTER); - rect(width/2, 142, width, 284); + rect(width / 2, 142, width, 284); } void lines() { stroke(0); strokeWeight(grid); - for (int i = 0; i