#circle checkEdges() error : chp01_vectors\NOC_1_7_motion101
Aweistory opened this issue · comments
Aweis commented
we can add radius 24(48/2),display will be right
void checkEdges() {
if (position.x > width + 24) {
position.x = 0;
}
else if (position.x < 0 - 24) {
position.x = width;
}
if (position.y > height + 24) {
position.y = 0;
}
else if (position.y < 0 - 24) {
position.y = height;
}
}