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

Calling FrameConvexPolygon2D.setIncludingFrame() doesn't set frame with empty vertex. #16

Closed
rjgriffin42 opened this issue Sep 25, 2018 · 3 comments

Comments

@rjgriffin42
Copy link
Member

The following case current fails:

There are two random polygons, in random frames, polygonA and polygonB.

polygonA.clear();
polygonB.clear();
polygonB.setIncludingFrame(polygonA);
assert(polygonA.epsilonEquals(polygonB, 1e-5);

This fails because of a reference frame mismatch.

@rjgriffin42
Copy link
Member Author

Note that a way around this is

polygonA.clear();
polygonB.clear();
polygonB.setIncludingFrame(polygonA.getReferenceFrame(), polygonA);
assert(polygonA.epsilonEquals(polygonB, 1e-5);

This isn't exactly a desirable work around, though.

@SylvainBertrand
Copy link
Member

Oh wow, I'll fix that, thanks!

@SylvainBertrand
Copy link
Member

Addressed in a2ac895

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

No branches or pull requests

2 participants