MCPcopy Create free account
hub / github.com/Khan/perseus / getLineIntersectionString

Function getLineIntersectionString

packages/kmath/src/geometry.ts:367–379  ·  view source on GitHub ↗
(
    firstPoints: readonly [Coord, Coord],
    secondPoints: readonly [Coord, Coord],
)

Source from the content-addressed store, hash-verified

365}
366
367export 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}

Callers 1

Calls 1

getLineIntersectionFunction · 0.85

Tested by

no test coverage detected