Skip to content

Commit

Permalink
refactor(geom-voronoi): update pointInSegment call
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed May 22, 2019
1 parent 2079bfe commit af350fc
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/geom-voronoi/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { IObjectOf, Pair } from "@thi.ng/api";
import { isNumber } from "@thi.ng/checks";
import { liangBarsky2, sutherlandHodgeman } from "@thi.ng/geom-clip";
import {
pointInCircumCircle,
pointInPolygon2,
pointInSegment2
} from "@thi.ng/geom-isec";
import { pointInCircumCircle, pointInPolygon2, pointInSegment } from "@thi.ng/geom-isec";
import { centroid, circumCenter2 } from "@thi.ng/geom-poly-utils";
import { EPS } from "@thi.ng/math";
import { Edge } from "@thi.ng/quad-edge";
Expand Down Expand Up @@ -61,7 +57,7 @@ export class DVMesh<T> {
add(p: ReadonlyVec, val?: T, eps = EPS) {
let [e, exists] = this.locate(p, eps);
if (exists) return false;
if (pointInSegment2(p, e.origin.pos, e.dest.pos)) {
if (pointInSegment(p, e.origin.pos, e.dest.pos)) {
e = e.oprev;
e.onext.remove();
}
Expand Down

0 comments on commit af350fc

Please sign in to comment.