#include "Mouse.hpp" namespace MC::GFX { Vector<2> Mouse::update(GLFWwindow* window) { double x, y; glfwGetCursorPos(window, &x, &y); if (m_first_event) { m_last_x = x; m_last_y = y; m_first_event = false; } Vector<2> movement{static_cast(x) - m_last_x, static_cast(y) - m_last_y}; m_last_x = x; m_last_y = y; return movement; } }