Skip to content

Commit 73d9203

Browse files
committed
fix an edge case in orient3d + minor updates
1 parent 7a8e5f2 commit 73d9203

3 files changed

Lines changed: 15 additions & 15 deletions

File tree

src/insphere.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -271,19 +271,19 @@ export function insphere(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey,
271271
return -insphereadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez, permanent);
272272
}
273273

274-
export function inspherefast(pax, pay, paz, pbx, pby, pbz, pcx, pcy, pcz, pdx, pdy, pdz, pex, pey, pez) {
275-
const aex = pax - pex;
276-
const bex = pbx - pex;
277-
const cex = pcx - pex;
278-
const dex = pdx - pex;
279-
const aey = pay - pey;
280-
const bey = pby - pey;
281-
const cey = pcy - pey;
282-
const dey = pdy - pey;
283-
const aez = paz - pez;
284-
const bez = pbz - pez;
285-
const cez = pcz - pez;
286-
const dez = pdz - pez;
274+
export function inspherefast(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez) {
275+
const aex = ax - ex;
276+
const bex = bx - ex;
277+
const cex = cx - ex;
278+
const dex = dx - ex;
279+
const aey = ay - ey;
280+
const bey = by - ey;
281+
const cey = cy - ey;
282+
const dey = dy - ey;
283+
const aez = az - ez;
284+
const bez = bz - ez;
285+
const cez = cz - ez;
286+
const dez = dz - ez;
287287

288288
const ab = aex * bey - bex * aey;
289289
const bc = bex * cey - cex * bey;

src/orient3d.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const u = vec(4);
2020

2121
const _8 = vec(8);
2222
const _8b = vec(8);
23-
const _16 = vec(8);
23+
const _16 = vec(16);
2424
const _12 = vec(12);
2525

2626
let fin = vec(192);

src/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export const epsilon = 1.1102230246251565e-16;
22
export const splitter = 134217729;
33
export const resulterrbound = (3 + 8 * epsilon) * epsilon;
44

5-
// fast_expansion_sum_zeroelim routine from oritinal code
5+
// fast_expansion_sum_zeroelim routine from original code
66
export function sum(elen, e, flen, f, h) {
77
let Q, Qnew, hh, bvirt;
88
let enow = e[0];

0 commit comments

Comments
 (0)