-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Circle2D intersection with Line(Segment)2D (#237)
* Feat: Line2D.DistanceTo(point) * feat: Circle2D.IntersectWith(Line2D) * doc: fix xml comment * refactor: extract the private method findParameterTs(Line2D) Aleady existing test cases must be changed because of the implementation of FindRoots.Polynomial(coeffs), that is, the order of the solutions. * feat: Circle2D.IntersectWith(LineSegment2D) * doc: fix the variable-name list in comment * fix: a typo * change: use the fact that dot-product of the unit vector is always 1.0 * Revert "Feat: Line2D.DistanceTo(point)" This reverts commit 0a2521d. * remove: src/Spatial/Extensions/DoubleExtensions.cs * doc: revise xml comments * fix a typo * test: fix testcases to test number of intersections * fix: IntersectionWith() to return a single point when a line tangent to the circle * test: Add tests for intersection of Circle and LineSegment2D for the case where LineSegment contains some of obtained intersections. * test: add TODO comment * refactor: rename line to segment * fix: type declaration (from 1d to 1.0) * test: fix testcases to use expected points * test: fix testcases to use expected points * test: add testcases where the line is parallel to the Y-axis * test: add testcases parallel to Y-axis and general cases * test: add testcases for Intersection of Circle2D with LIneSegment2D - parallel to X-axis - parallel to Y-axis - general cases (eg. x-y+c=0) test: rename method's name * test: replace +01 to +1 * Minor changes in test --------- Co-authored-by: jkaliak <[email protected]>
- Loading branch information
Showing
3 changed files
with
189 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters