fix(core): Edge case in utils.beamsIntersect()
See #1206 for details Closes #1206 Closes #1211
This commit is contained in:
parent
e3e619ee0c
commit
3b9309d995
3 changed files with 24 additions and 4 deletions
|
@ -490,3 +490,12 @@ it("Should find where a curve intersects a given Y-value", () => {
|
|||
expect(round(i.x)).to.equal(39.49);
|
||||
expect(round(i.y)).to.equal(30);
|
||||
});
|
||||
|
||||
// Recreate issue #1206
|
||||
it("Should find intersecting beams when a line is almost vertical", () => {
|
||||
let a = new freesewing.Point(225.72, 241);
|
||||
let b = new freesewing.Point(225.71999999999997, 600);
|
||||
let i = utils.beamIntersectsY(a, b, 400);
|
||||
expect(round(i.y)).to.equal(400);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue