-
Notifications
You must be signed in to change notification settings - Fork 41
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
Compute distance sphere-box #495
Conversation
test/tstDetailsAlgorithms.cpp
Outdated
// distance between a sphere and a box included in that sphere | ||
BOOST_TEST(distance(sphere, Box{{0.5, 0.5, 0.5}, {0.6, 0.7, 0.8}}) == 0.f); |
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.
That box is not included in the sphere, isn't it?
0.6^2+0.7^2+0.8^2=0.36+0.49+0.64=1.49 > 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.
Yeah, sorry about that. It's fixed.
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.
Looks good. Could also rewrite intersects(Sphere, Box)
to use it, if desired.
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.
Looks good.
Retest this please |
The CI fails because PGI times out on |
We need this to use Nearest with Sphere. Right now we can only use Sphere with Intersect.