Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve joystick visualisation in gamepad example #2390

Merged
merged 1 commit into from
Mar 14, 2022
Merged

Improve joystick visualisation in gamepad example #2390

merged 1 commit into from
Mar 14, 2022

Conversation

kristianlm
Copy link
Contributor

The joystick range is a float from -1 through +1. Casting this to int
yields only three possible values: -1, 0, and 1. This gives a
misleading joystick placement in the demo.

By casting to int after the multiplication, the demo reveals the
analog feel of the joystick.

The joystick range is a float from -1 through +1. Casting this to int
yields only three possible values: -1, 0, and 1. This gives a
misleading joystick placement in the demo.

By casting to int after the multiplication, the demo reveals the
analog feel of the joystick.
@raysan5 raysan5 merged commit ec7250c into raysan5:master Mar 14, 2022
@raysan5
Copy link
Owner

raysan5 commented Mar 14, 2022

@kristianlm Good catch! Thanks for the improvement! :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants