-
Notifications
You must be signed in to change notification settings - Fork 69
Add USE_FLOAT_EXCEPTIONS to enable floating point exceptions
#1451
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
Changes from all commits
e384d0b
42c8c60
625a884
6b0062c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -699,9 +699,15 @@ inline vec_t VectorNormalize( vec3_t v ) | |
| // that length != 0, nor does it return length | ||
| inline void VectorNormalizeFast( vec3_t v ) | ||
| { | ||
| vec_t ilength = Q_rsqrt_fast( DotProduct( v, v ) ); | ||
| vec_t length = DotProduct( v, v ); | ||
|
|
||
| VectorScale( v, ilength, v ); | ||
| #if DAEMON_USE_FLOAT_EXCEPTIONS | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The program should not change its behavior like that when the debugging thing is used. That nullifies the whole point of it.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not changing this behavior nullifies the whole point of it.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The whole point of it is:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Why? There should be some explanation for this.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What I mean is that it can be fine to purposely ignore one specific hack, instead of making impossible to debug anything else because of one hack. Anyway, this code raises other questions:
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, answers were:
So if we consider it OK to get
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just want to see some code comment about why this happens.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried to see for myself and apparently some models trigger it in R_TBNtoQtangents. |
||
| if ( length ) | ||
| #endif | ||
| { | ||
| vec_t ilength = Q_rsqrt_fast( length ); | ||
| VectorScale( v, ilength, v ); | ||
| } | ||
| } | ||
|
|
||
| inline vec_t VectorNormalize2( const vec3_t v, vec3_t out ) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.