Skip to content

@technobuddha > library > Geometry > Point

Function: isLeftOfLine()

ts
function isLeftOfLine(point: Cartesian, line: LineSegment): boolean;

Defined in: is-left-of-line.ts:18

Determines whether a given point lies to the left of a specified line segment.

Parameters

ParameterTypeDescription
pointCartesianThe Cartesian point to test.
lineLineSegmentThe line segment to compare against.

Returns

boolean

true if the point is to the left of the line segment; otherwise, false.

Example

typescript
isLeftOfLine({ x: 5, y: 5 }, { x0: 0, y0: 0, x1: 10, y1: 0 }); // true