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

[GNU/LINUX] Grid snapping and angle snapping not exact digits #5298

Closed
Darkinggq opened this issue Nov 4, 2021 · 1 comment · Fixed by #6748
Closed

[GNU/LINUX] Grid snapping and angle snapping not exact digits #5298

Darkinggq opened this issue Nov 4, 2021 · 1 comment · Fixed by #6748
Assignees
Labels
feature/editor This item is related to the editor subsystem. kind/bug Categorizes issue or PR as related to a bug. needs-ux-design This ticket requires UX to work on the design before it can be implemented. priority/major Major priority. Work that should be handled after all blocking and critical work is done. sig/content Categorizes an issue or PR as relevant to SIG Content. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@Darkinggq
Copy link

Describe the bug
Enabled grid snapping and angle snapping digits is 0.4 sometimes not exact digits 0.39999913 this is a bug

Screenshots/Video

2021-11-04.12-11-37.mp4
2021-11-04.12-12-15.mp4

Found in Branch
stabilization/2110 5a0b631

Desktop/Device (please complete the following information):

  • Device: PC
  • OS: Xubuntu
  • Version: 20.04.03 LTS
  • CPU: AMD 3 3100
  • GPU: AMD 5500 XT [Mesa 21.0.3]
  • Memory: 16GB
@Darkinggq Darkinggq added kind/bug Categorizes issue or PR as related to a bug. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Nov 4, 2021
@forhalle forhalle added sig/content Categorizes an issue or PR as relevant to SIG Content. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Nov 4, 2021
@monroegm monroegm added triage/accepted Indicates an issue or PR is ready to be actively worked on. priority/major Major priority. Work that should be handled after all blocking and critical work is done. feature/prefabs This item is related to the prefab system and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Nov 4, 2021
@hultonha
Copy link
Contributor

hultonha commented Jan 4, 2022

@Magical10240 Thanks for raising this but this technically isn't a bug, this is just a limitation of floating point numbers.

They cannot always represent exact values (e.g. with 0.4, the closest 32 bit representation is is either 0.3999999761581421 or 0.4000000059604645. One option in the Editor would be to have the display round to a smaller number of significant digits, the problem is then you technically hide what's actually happening, so it's a tough call on what the best option is sometimes...

There are some fantastic posts about floating point math here which are worth reading to learn more about the topic - https://randomascii.wordpress.com/2012/01/11/tricks-with-the-floating-point-format/ and https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/ to name a few).

It might be worth looping in UX to get their take on this, the underlying logic itself though is sound (after having watched the attached videos, thanks again for including them! 👍)

@hultonha hultonha added needs-ux-design This ticket requires UX to work on the design before it can be implemented. feature/editor This item is related to the editor subsystem. and removed feature/prefabs This item is related to the prefab system labels Jan 4, 2022
@jjjoness jjjoness self-assigned this Jan 4, 2022
jjjoness added a commit to aws-lumberyard-dev/o3de that referenced this issue Jan 10, 2022
…igits-o3de#5298

Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/editor This item is related to the editor subsystem. kind/bug Categorizes issue or PR as related to a bug. needs-ux-design This ticket requires UX to work on the design before it can be implemented. priority/major Major priority. Work that should be handled after all blocking and critical work is done. sig/content Categorizes an issue or PR as relevant to SIG Content. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants