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

Don’t use a fixed increment, use current precision #16

Open
LeaVerou opened this issue Apr 23, 2024 · 0 comments
Open

Don’t use a fixed increment, use current precision #16

LeaVerou opened this issue Apr 23, 2024 · 0 comments

Comments

@LeaVerou
Copy link
Owner

Currently, incrementing a number like 0.123456 will produce 1.123456 which is rarely useful. There are modifiers for getting 1/10th of the increment, but that is little help with these cases.

Ideally, you'd want to use the actual precision of the number, meaning 0.5678 would be incremented like (assuming we just keep hitting the up arrow):

0.5678, 0.5679,
0.568, 0.569,
0.57, 0.58, 0.59,
0.6, 0.7, 0.8, 0.9,
1
2
3
...

The step would still be capped to 1, i.e. incrementing 100000000 would still produce 100000001.

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

No branches or pull requests

1 participant