An extrange "error"
in
Programming Questions
•
2 years ago
Hello!
I was creating a little program, and i had a very extrange error.
This code runs perfectly:
but in this one, which is the same, it doesn´t draw the grid:
Does anyone know why?
Thanks!
I was creating a little program, and i had a very extrange error.
This code runs perfectly:
- void setup()
{
size(600,600);
background(255);
rectMode(CORNERS);
}
void draw()
{
stroke(0);
rect(200, 175, 400, 575);
stroke(200);
for(int x = 210; x < 400; x += 10)
{
line(x, 175, x, 575);
//println(x);
}
for(int y = 185; y < 575; y += 10)
{
line(200, y, 400, y);
//println(y);
}
}
but in this one, which is the same, it doesn´t draw the grid:
- void setup()
{
size(600,600);
background(255);
rectMode(CORNERS);
}
void draw()
{
stroke(200);
for(int x = 210; x < 400; x += 10)
{
line(x, 175, x, 575);
//println(x);
}
for(int y = 185; y < 575; y += 10)
{
line(200, y, 400, y);
//println(y);
}
stroke(0);
rect(200, 175, 400, 575);
}
Does anyone know why?
Thanks!
1