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

Remove redundant code #24

Closed
Glusk opened this issue Feb 24, 2019 · 0 comments
Closed

Remove redundant code #24

Glusk opened this issue Feb 24, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@Glusk
Copy link
Owner

Glusk commented Feb 24, 2019

This functionality:

https://github.com/Glusk2/sprouts/blob/6e2cf80bc01799d028a767cc0d33f077f50e3334/core/src/main/java/com/github/glusk2/sprouts/geom/PerpDistSimpl.java#L62-L95

is implemented in libGDX:

Intersector.distanceSegmentPoint(po, p1, x)

Moreover libGDX clips the projection to the line segment. If the projection doesn't fall on the segment, libGDX computes the Euclidean distance to the nearest segment end point.

@Glusk Glusk added the enhancement New feature or request label Feb 24, 2019
@Glusk Glusk closed this as completed in #25 Feb 24, 2019
Glusk pushed a commit that referenced this issue Feb 24, 2019
#24 Replaced custom perpendicular distance with libGDX's version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant