Touchscreen Edge Detection

Have no clue what to do honestly.
Found this online

p.y = map(p.x, TS_LEFT, TS_RIGHT, 0, display.height());
p.x = map(p.y, TS_BOT, TS_TOP, 0, display.width());