From 4e4f029137a0c7fad6be06265ce7a80deba2256e Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Tue, 1 Jun 2021 16:29:56 -0400 Subject: [PATCH] fix determinant --- src/geo/base.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/geo/base.js b/src/geo/base.js index 7e874ebf..21b58249 100644 --- a/src/geo/base.js +++ b/src/geo/base.js @@ -323,7 +323,7 @@ { let denominator = 2*determinant33([[A.x, A.y, 1], [B.x, B.y, 1], [C.x, C.y, 1]]); let xmat = [[A.x*A.x + A.y*A.y, A.y, 1],[B.x*B.x + B.y*B.y, B.y, 1],[C.x*C.x + C.y*C.y, C.y, 1]]; - let ymat = [[A.y, A.x*A.x + A.y*A.y, 1],[B.y, B.x*B.x + B.y*B.y, 1],[C.y, C.x*C.x + C.y*C.y, 1]]; + let ymat = [[A.x, A.x*A.x + A.y*A.y, 1],[B.x, B.x*B.x + B.y*B.y, 1],[C.x, C.x*C.x + C.y*C.y, 1]]; let center = {x:determinant33(xmat)/denominator, y:determinant33(ymat)/denominator, z:A.z}; @@ -358,8 +358,6 @@ return center; } - - /** * return two possible circle centers given two points and a radius * https://stackoverflow.com/questions/36211171/finding-center-of-a-circle-given-two-points-and-radius