added a magnitude/direction/heading constructor to Vector2
moved the glfwWindowShouldClose check to the updating thread instead of the drawing thread