-
-
Notifications
You must be signed in to change notification settings - Fork 149
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
[geom-isec] pointInSegment2 fails when line is perpendicular #84
Comments
when ax === bx or ay === by, a divide by zero was caused, returning false now takes the eps param into account with small segments fixes thi-ng#84
On seconds thoughts, the change to epsilon is not as straightforward as I thought: with a totally horizontal line and an epsilon of (e.g.)
Input appreciated! Perhaps this approach would work, but would be more expensive: http://paulbourke.net/geometry/pointlineplane/ |
Just linking PR comment here: #85 (comment) |
* develop: build: remove unintended ecs pkg Publish refactor(geom-voronoi): update pointInSegment call feat(geom): add Plane, Quad3 factories & ops fix(geom-isec): fix #84, update pointInSegment, add tests feat(geom-isec): add ray-plane, plane-plane fns, update readme fix(geom-closest-point): flip sign of plane W component, extract distToPlane() feat(math): add sigmoid / sigmoid11 fns feat(associative): add sparseSet factory fn fix(pointfree): update safeMode handling feat(matrices): add outerProduct for vec 2/3/4 docs(math): minor update doc strings feat(math): add extrema & crossing fns and Crossing enum refactor(associative): minor updates ArraySet feat(associative): add SparseSet8/16/32 refactor(vector-pools): update Type imports refactor(malloc): remove Type enum, SIZEOF feat(api): add Type enum, IntArray, UIntArray, FloatArray, SIZEOF
If
a[0] === b[0]
ora[1] === b[1]
then we get a divide by zero, and will always returnfalse
.Also, the check
!(tx < 0 || tx > 1 || ty < 0 || ty > 1)
doesn't takeeps
into account, so the following will returnfalse
as
Pull request coming...
The text was updated successfully, but these errors were encountered: