MCPcopy Index your code
hub / github.com/microsoft/SandDance / corner

Function corner

docs/app/js/sanddance-app.js:133079–133081  ·  view source on GitHub ↗
(p, direction)

Source from the content-addressed store, hash-verified

133077 else stream.point(to[0], to[1]);
133078 }
133079 function corner(p, direction) {
133080 return (0, _mathJs.abs)(p[0] - x0) < (0, _mathJs.epsilon) ? direction > 0 ? 0 : 3 : (0, _mathJs.abs)(p[0] - x1) < (0, _mathJs.epsilon) ? direction > 0 ? 2 : 1 : (0, _mathJs.abs)(p[1] - y0) < (0, _mathJs.epsilon) ? direction > 0 ? 1 : 0 : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon
133081 }
133082 function compareIntersection(a, b) {
133083 return comparePoint(a.x, b.x);
133084 }

Callers 2

interpolateFunction · 0.70
comparePointFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected