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

Renamed isnan() to IsReasonable #610

Closed
wants to merge 2 commits into from

Conversation

phkahler
Copy link
Member

Fixes #603.

src/solvespace.h Outdated
#ifndef isnan
# define isnan(x) (((x) != (x)) || (x > 1e11) || (x < -1e11))
#ifndef IsReasonable
# define IsReasonable(x) (((x) != (x)) || (x > 1e11) || (x < -1e11))
Copy link
Contributor

Choose a reason for hiding this comment

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

The whole point of renaming would be to get rid of a name collision and all this preprocessor junk. This function should be static inline inside namespace SolveSpace, like the WRAP ones.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, ok.

Copy link
Member Author

Choose a reason for hiding this comment

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

You want the WRAP one to be static too?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I misremembered that it was already static. It makes zero difference either way. Just make them all the same.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. unless you want the 3 wrap functions inline too.

@whitequark
Copy link
Contributor

whitequark commented May 12, 2020

@phkahler I applied the rename in 0be42a8. I did it myself because in this PR you did not include either the issue number or the explanation of the change, so for anyone reading the history it would be a mystery why it was done.

@whitequark whitequark closed this May 12, 2020
@phkahler phkahler deleted the is-reasonable branch May 13, 2020 00:12
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.

Unusual definition of isnan() and its implications
2 participants