I'm a total java / processing newb and i've been going through tutorials and what not and found this.y = 12345
what is the point of this., where just setting = to creates the same thing?
example
float ypos = 50;
void setup() {
size(100, 100);
noLoop();
}
void draw() {
line(0, 0, 100, ypos);
this.ypos = 100;
line(0, 0, 100, ypos);
this.ypos = 150;
line(0,0,100, ypos);
}
is the same result as
float ypos = 50;
void setup() {
size(100, 100);
noLoop();
}
void draw() {
line(0, 0, 100, ypos);
ypos = 100;
line(0, 0, 100, ypos);
ypos = 150;
line(0,0,100, ypos);
}
any reason why?
1