more cleanup in preparation for model translation#4443
Merged
wookieejedi merged 2 commits intoAug 11, 2022
Merged
Conversation
Goober5000
commented
Jun 26, 2022
Contributor
- Clean up stepped rotation, fixing some logic, adding safeguards for invalid values, and allowing rotations to go in the opposite direction
- Add more specific SEXP error checking for AWACS and rotating subsystems
- Assorted refactoring and polishing
ccf8652 to
ee5929d
Compare
BMagnu
requested changes
Jul 8, 2022
BMagnu
left a comment
Member
There was a problem hiding this comment.
Mostly good cleanup, but a few minor things
1) Clean up stepped rotation, fixing some logic, adding safeguards for invalid values, and allowing rotations to go in the opposite direction 2) Add more specific SEXP error checking for AWACS and rotating subsystems 3) Assorted refactoring and polishing
ee5929d to
6de16d2
Compare
Contributor
Author
|
Ok, changes addressed. |
BMagnu
requested changes
Jul 9, 2022
6de16d2 to
baadf5d
Compare
Goober5000
added a commit
to Goober5000/fs2open.github.com
that referenced
this pull request
Aug 19, 2022
Floating-point comparisons are tricky beasts. See this article for a good summary of the issues involved: https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/ This PR improves support somewhat, although there are obviously situations in the code (such as comparisons to 0) that should still be addressed. This PR makes the following improvements: 1) Tightens the threshold on `IS_VEC_NULL` and `IS_VEC_NULL_SQ_SAFE` from 1e-16 and 1e-36 to FLT_EPSILON 2) Tightens the threshold for parsing `turn_time` in POFs 3) Restores the previous implementation of `fl_equal` 4) Adds a dedicated `IS_MOI_VEC_NULL` for moment of inertia values 5) Improves documentation Follow-up to scp-fs2open#4535 and scp-fs2open#4443.
Goober5000
added a commit
to Goober5000/fs2open.github.com
that referenced
this pull request
Aug 20, 2022
As part of the cleanup in preparation for model translation, there was a bit of code review that was actually incorrect. The calculation of the current step needs to be rounded down, because the step isn't actually complete until it fully reaches the next number. Rounding the step causes the submodel to jump around in all sorts of weird ways. Follow-up to scp-fs2open#4443.
Merged
Goober5000
added a commit
to Goober5000/fs2open.github.com
that referenced
this pull request
Aug 20, 2022
As part of the cleanup in preparation for model translation, there was a bit of code review that was actually incorrect. The calculation of the current step needs to be rounded down, because the step isn't actually complete until it fully reaches the next number. Rounding the step causes the submodel to jump around in all sorts of weird ways. Follow-up to scp-fs2open#4443.
Goober5000
added a commit
to Goober5000/fs2open.github.com
that referenced
this pull request
Aug 26, 2022
Floating-point comparisons are tricky beasts. See this article for a good summary of the issues involved: https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/ This PR improves support somewhat, although there are obviously situations in the code (such as comparisons to 0) that should still be addressed. This PR makes the following improvements: 1) Tightens the threshold on `IS_VEC_NULL` and `IS_VEC_NULL_SQ_SAFE` from 1e-16 and 1e-36 to FLT_EPSILON 2) Tightens the threshold for parsing `turn_time` in POFs 3) Restores the previous implementation of `fl_equal` 4) Adds a dedicated `IS_MOI_VEC_NULL` for moment of inertia values 5) Improves documentation Follow-up to scp-fs2open#4535 and scp-fs2open#4443.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.