natiny_input_get_mouse_x_speed
int natiny_input_get_mouse_x_speed(void);
Returns the horizontal movement delta of the mouse cursor since the previous frame.
Returns
| Type | Description |
|---|---|
int |
Horizontal movement in drawing units since the previous frame |
Example
int dx = natiny_input_get_mouse_x_speed();
Notes
- Positive values indicate rightward movement; negative values indicate leftward movement.
- The result uses the same coordinate system as drawing commands and is
0when the cursor position does not change.