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

Check if values are close to 0 before floor #392

Merged

Conversation

charliefoxtwo
Copy link
Member

Fixes part of #373 and #387

Copy link
Contributor

@jdahlblom jdahlblom left a comment

Choose a reason for hiding this comment

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

I guess it will work most of the time (dynamic epsilon comparison). I think we should use round2 when needed.

@charliefoxtwo
Copy link
Member Author

I guess it will work most of the time (dynamic epsilon comparison). I think we should use round2 when needed.

I'm not sure we ever actually need it though. This simple epsilon comparison is also a lot more performant, and only needs to occur in the one place. This way, we don't have to worry about rounding all the values we pass into this function.

Ultimately, this is only an issue with the value ending up just barely below 0.

@jdahlblom jdahlblom added this pull request to the merge queue Oct 9, 2023
Merged via the queue into DCS-Skunkworks:master with commit 72cbcc7 Oct 9, 2023
2 checks passed
@charliefoxtwo charliefoxtwo deleted the bugfix/fix-small-values branch October 9, 2023 17:53
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