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

Round squircled axis values to the nearest whole number #13671

Merged
merged 2 commits into from
Apr 16, 2023

Conversation

shockdude
Copy link
Contributor

For the default squircle value of 8000, I observed the following behavior:
ConvertToSquirclePoint(128,128) --> (128,128). This makes sense to me.
ConvertToSquirclePoint(127,127) --> (126,126). Huh.

If you don't cast the coordinate values to integer, you get the following:
ConvertToSquirclePoint(128,128) --> (128.0625, 128.0625)
ConvertToSquirclePoint(127,127) --> (126.9375, 126.9375)

To me, it makes sense to round the coordinate values to the nearest whole number instead of just casting them to integers. This way, joysticks centered at (127,127) remain centered at (127,127) instead of getting recentered to (126,126).

Implementing this allows me to implement #13636 without having to workaround joysticks being centered at (126,126).

Copy link
Contributor

@RipleyTom RipleyTom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Megamouse Megamouse merged commit 6a9e0c5 into RPCS3:master Apr 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants