MCPcopy Create free account
hub / github.com/microsoft/SandDance / circumradius

Function circumradius

docs/app/js/sanddance-app.js:140178–140189  ·  view source on GitHub ↗
(ax, ay, bx, by, cx, cy)

Source from the content-addressed store, hash-verified

140176 return dx * (ey * cp - bp * fy) - dy * (ex * cp - bp * fx) + ap * (ex * fy - ey * fx) < 0;
140177}
140178function circumradius(ax, ay, bx, by, cx, cy) {
140179 const dx = bx - ax;
140180 const dy = by - ay;
140181 const ex = cx - ax;
140182 const ey = cy - ay;
140183 const bl = dx * dx + dy * dy;
140184 const cl = ex * ex + ey * ey;
140185 const d = 0.5 / (dx * ey - dy * ex);
140186 const x = (ey * bl - dy * cl) * d;
140187 const y = (dx * cl - ex * bl) * d;
140188 return x * x + y * y;
140189}
140190function circumcenter(ax, ay, bx, by, cx, cy) {
140191 const dx = bx - ax;
140192 const dy = by - ay;

Callers 1

updateMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected