1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-30 05:58:52 -05:00

Added note on coordinate truncation.

This commit is contained in:
Camilla Berglund 2013-04-25 18:03:15 +02:00
parent 690fe6f645
commit 3ec2925da4

View File

@ -1758,6 +1758,10 @@ GLFWAPI int glfwGetMouseButton(GLFWwindow* window, int button);
* the cursor position is unbounded and limited only by the minimum and maximum * the cursor position is unbounded and limited only by the minimum and maximum
* values of a `double`. * values of a `double`.
* *
* The coordinate can be converted to their integer equivalents with the
* `floor` function. Casting directly to an integer type works for positive
* coordinates, but fails for negative ones.
*
* @param[in] window The desired window. * @param[in] window The desired window.
* @param[out] xpos The cursor x-coordinate, relative to the left edge of the * @param[out] xpos The cursor x-coordinate, relative to the left edge of the
* client area, or `NULL`. * client area, or `NULL`.