|
@@ -35,6 +35,14 @@ export class generate {
|
|
|
const b = p2.y - k * p2.x;
|
|
|
|
|
|
const Lb2 = l / Math.sin(Math.abs(a1 - a2) / 2);
|
|
|
+
|
|
|
+ if (k1 / k2 == -1) {
|
|
|
+ if (dx2 * dx1 > 0 && dy2 * dy1 < 0) {
|
|
|
+ return [Number((p2.x - Lb2).toFixed(6)), Number(p2.y.toFixed(6)), Number((p2.x + Lb2).toFixed(6)), Number(p2.y.toFixed(6))]
|
|
|
+ } else if (dx2 * dx1 < 0 && dy2 * dy1 > 0) {
|
|
|
+ return [Number(p2.x.toFixed(6)), Number((p2.y - Lb2).toFixed(6)), Number(p2.x.toFixed(6)), Number((p2.y + Lb2).toFixed(6))]
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
const A = k * k + 1;
|
|
|
const B = 2 * k * b - 2 * p2.x - 2 * k * p2.y;
|