Created
October 7, 2015 17:22
-
-
Save federico-pepe/51fec73588ef752d5ef1 to your computer and use it in GitHub Desktop.
Operatori Logici 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void setup() { | |
| size(500, 500); | |
| stroke(255); | |
| } | |
| void draw() { | |
| if((mouseX < width/2) && (mouseY < height/2)) { | |
| background(255, 0, 0); | |
| } else if((mouseX > width/2) && (mouseY < height/2)) { | |
| background(0, 255, 0); | |
| } else { | |
| background(0); | |
| } | |
| line(width/2, 0, width/2, height); | |
| line(0, height/2, width, height/2); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment