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
Conversation
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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
can you change the title of this issue to something more descriptitve? i |
This now includes updates from #4958. |
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 |
@arturoc This should be ready to merge after CI checks. |
…orks into bugfix-ofRectangle
@arturoc This should be ready to merge after CI checks. |
@arturoc - This should be ready to go. |
See #4871 for discussion.