mirror of
https://github.com/sbrl/Nibriboard.git
synced 2018-01-10 21:33:49 +00:00
Don't try to erase liesn with less than 2 points
This commit is contained in:
parent
d7c01b725a
commit
e1ba8f9a18
2 changed files with 6 additions and 1 deletions
|
@ -79,6 +79,11 @@ class Chunk
|
||||||
for (let i = this.lines.length - 1; i >= 0; i--) {
|
for (let i = this.lines.length - 1; i >= 0; i--) {
|
||||||
// If our distance to the line is less than half the width (i.e.
|
// If our distance to the line is less than half the width (i.e.
|
||||||
// the radius), then we must be inside it
|
// the radius), then we must be inside it
|
||||||
|
|
||||||
|
// Skip lines with less than 2 points
|
||||||
|
// TODO: Handle these separately
|
||||||
|
if(this.lines[i].Points.length < 2)
|
||||||
|
continue;
|
||||||
let thisLineDistanceData = point_line_distance_multi(point, this.lines[i].Points);
|
let thisLineDistanceData = point_line_distance_multi(point, this.lines[i].Points);
|
||||||
if(thisLineDistanceData[1] <= this.lines[i].Width / 2)
|
if(thisLineDistanceData[1] <= this.lines[i].Width / 2)
|
||||||
return this.lines[i];
|
return this.lines[i];
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit f56620e8cf1ad23a9f24aeeb0b850ef2c749b474
|
Subproject commit fc8f65e2aff3953e6ca616d26df0d87ba4b4c3d3
|
Loading…
Reference in a new issue