(
firstPoints: readonly [Coord, Coord],
secondPoints: readonly [Coord, Coord],
)
| 365 | } |
| 366 | |
| 367 | export function getLineIntersectionString( |
| 368 | firstPoints: readonly [Coord, Coord], |
| 369 | secondPoints: readonly [Coord, Coord], |
| 370 | ): string { |
| 371 | const intersection = getLineIntersection(firstPoints, secondPoints); |
| 372 | |
| 373 | if (intersection === null) { |
| 374 | return "Lines are parallel"; |
| 375 | } |
| 376 | |
| 377 | const [x, y] = intersection; |
| 378 | return "Intersection: (" + x.toFixed(3) + ", " + y.toFixed(3) + ")"; |
| 379 | } |
no test coverage detected