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

Function curve

docs/app/js/sanddance-app.js:129823–129826  ·  view source on GitHub ↗
(sx, sy, tx, ty)

Source from the content-addressed store, hash-verified

129821};
129822const arcR = (sa, sr, ta, tr)=>arc(sr * Math.cos(sa), sr * Math.sin(sa), tr * Math.cos(ta), tr * Math.sin(ta));
129823const curve = (sx, sy, tx, ty)=>{
129824 const dx = tx - sx, dy = ty - sy, ix = 0.2 * (dx + dy), iy = 0.2 * (dy - dx);
129825 return "M" + sx + "," + sy + "C" + (sx + ix) + "," + (sy + iy) + " " + (tx + iy) + "," + (ty - ix) + " " + tx + "," + ty;
129826};
129827const curveR = (sa, sr, ta, tr)=>curve(sr * Math.cos(sa), sr * Math.sin(sa), tr * Math.cos(ta), tr * Math.sin(ta));
129828const orthoX = (sx, sy, tx, ty)=>"M" + sx + "," + sy + "V" + ty + "H" + tx;
129829const orthoY = (sx, sy, tx, ty)=>"M" + sx + "," + sy + "H" + tx + "V" + ty;

Callers 4

areaFunction · 0.70
sanddance-app.jsFile · 0.70
lineFunction · 0.70
curveRFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected