std::pair HelloMultitouchApp::normScreenToWindowPx(float screen_x, float screen_y){ Vec2i rect = getWindowSize(); int x_px; int y_px; if (!use_pixels) { x_px = static_cast(screen_x * screen_width); y_px = static_cast(screen_y * screen_height); } else { x_px = static_cast(screen_x); y_px = static_cast(screen_y); } int x = x_px - getWindowPosX(); int y = y_px - getWindowPosY(); return std::pair(x, y); }