static extendLine(startx: number, starty: number, endx: number, endy: number, dis: number) {
let x = endx - startx;
let y = endy - starty;
//标准化方向向量
let magnitude = Math.sqrt(x * x + y * y);
x /= magnitude;
y /= magnitude;
//沿开始点延长
// x = startx + dis * x;
// y = starty + dis * y;
//沿结束点方向延长
x = endx + dis * x;
y = endy + dis * y;
return { x: x, y: y }
}
TS延长线
最新推荐文章于 2025-10-27 23:02:22 发布
1132

被折叠的 条评论
为什么被折叠?



