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

Duplicated code between GJKDistance and GJKSignedDistance #289

Closed
hongkai-dai opened this issue May 22, 2018 · 0 comments
Closed

Duplicated code between GJKDistance and GJKSignedDistance #289

hongkai-dai opened this issue May 22, 2018 · 0 comments
Assignees

Comments

@hongkai-dai
Copy link
Contributor

hongkai-dai commented May 22, 2018

The code in GJKSignedDistance duplicates GJKDistance, except for one slight difference.

The two functions have the same interface. The difference is that GJKSignedDistance invokes libccd_extension::ccdGJKSignedDist and GJKDistance invokes libccd_extension::ccdGJKDist2. Otherwise, both methods do the same setup and tear down.

These methods should be refactored to call a single, common function (which takes a function pointer to the two different functions).

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