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

ofRectangle::intersects(const ofPoint& p0, const ofPoint& p1) fails in one case. Fixes #4871 #4872

Closed
wants to merge 6 commits into from

Conversation

bakercp
Copy link
Member

@bakercp bakercp commented Feb 19, 2016

See #4871 for discussion.

@bakercp bakercp added this to the 0.10.0 milestone Feb 19, 2016
@bakercp bakercp self-assigned this Feb 19, 2016
ofLineSegmentIntersection(p0, p1, topLeft, topRight, p) || // cross top
ofLineSegmentIntersection(p0, p1, topRight, bottomRight, p) || // cross right
ofLineSegmentIntersection(p0, p1, bottomRight, bottomLeft, p) || // cross bottom
ofLineSegmentIntersection(p0, p1, bottomLeft, topLeft, p); // cross left
ofLineSegmentIntersection(p0, p1, bottomLeft, topLeft, p) || // cross left
(left == p0.x && top == p1.y) || // Special case 1.
Copy link
Member

Choose a reason for hiding this comment

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

comparing floats with == is not a good idea, this should be using some kind of epsilon or something like that

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, was following the style in other places from the file. I'll update all.

@arturoc
Copy link
Member

arturoc commented Feb 20, 2016

can you change the title of this issue to something more descriptitve? i

@bakercp bakercp changed the title Fixes #4871 ofRectangle::intersects(const ofPoint& p0, const ofPoint& p1) fails in one case. Fixes #4871 Feb 20, 2016
@bakercp
Copy link
Member Author

bakercp commented Feb 20, 2016

@arturoc Since this issue is not limited to this one change in ofRectangle, I'd love to fix it by incorporating the function proposed here: #4888.

Let me know what you think.

@arturoc arturoc removed the docsprint label Feb 22, 2016
@bakercp
Copy link
Member Author

bakercp commented Mar 1, 2016

This now includes updates from #4958.

@arturoc
Copy link
Member

arturoc commented Mar 1, 2016

i'll check this when i have a moment, i mostly need to merge it in the glm branch before merging it into master to be sure that i merge this individually since ofRectangle has changed quite a bit with glm

@bakercp
Copy link
Member Author

bakercp commented May 16, 2017

@arturoc This should be ready to merge after CI checks.

@bakercp
Copy link
Member Author

bakercp commented Sep 7, 2017

@arturoc This should be ready to merge after CI checks.

@bakercp
Copy link
Member Author

bakercp commented Apr 24, 2018

@arturoc - This should be ready to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants