CreateDoubleArrow.js
function getMid(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]}function
getDistance(t,e){return
Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function
getAngle(t,e,i){let n=getAzimuth(e,t)-getAzimuth(e,i);return
n<0?n+TWO_PI:n}function getAzimuth(t,e){let
i,n=Math.asin(Math.abs(e[1]-t[1])/getDistance(t,e));return
e[1]>=t[1]&&e[0]>=t[0]?i=n+Math.PI:e[1]>=t[1]&&e[0]<t[0]?i=TWO_PI-n:e[1]<t[1]&&e[0]<t[0]?i=n:e[1]<t[1]&&e[0]>=t[0]&&(i=Math.PI-n),i}function
getSymetricPoint(t,e,i,n,r){let
o=getAzimuth(t,e),c=r?o+i:o-i,g=n*Math.cos(c),a=n*Math.sin(c);return[e[0]+g,e[1]+a]}function
calculateSymmetryPoint(t,e,i){let
n,r,o,c,g=getMid(t,e),a=getDistance(g,i),P=getAngle(t,g

技术
下载桌面版
GitHub
百度网盘(提取码:draw)
Gitee
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:ixiaoyang8@qq.com
QQ群:766591547
关注微信