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

Function dist

docs/app/js/sanddance-app.js:140150–140154  ·  view source on GitHub ↗
(ax, ay, bx, by)

Source from the content-addressed store, hash-verified

140148 return (dy > 0 ? 3 - p : 1 + p) / 4; // [0..1]
140149}
140150function dist(ax, ay, bx, by) {
140151 const dx = ax - bx;
140152 const dy = ay - by;
140153 return dx * dx + dy * dy;
140154}
140155// return 2d orientation sign if we're confident in it through J. Shewchuk's error bound check
140156function orientIfSure(px, py, rx, ry, qx, qy) {
140157 const l = (ry - py) * (qx - px);

Callers 1

updateMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected