Pseudo Code:
if (x > screenWidth) {
x -= screenWidth
}
if (x < 0) {
x += screenWidth
}
if (y > screenHeight) {
y -= screenHeight
}
if (y < 0) {
y += screenHeight
}
Pseudo Code:
if (x > screenWidth) {
x -= screenWidth
}
if (x < 0) {
x += screenWidth
}
if (y > screenHeight) {
y -= screenHeight
}
if (y < 0) {
y += screenHeight
}