@technobuddha/library
Version:
A large library of useful functions
17 lines (16 loc) • 688 B
TypeScript
import { type Cartesian, type LineSegment } from './@types/geometry.ts';
/**
* Determines whether a given point lies to the right of a specified line segment.
* @param point - The Cartesian point to test.
* @param line - The line segment to compare against.
* @returns `true` if the point is to the right of the line segment; otherwise, `false`.
* @example
* ```typescript
* isRightOfLine({ x: 2, y: 2 }, { x0: 0, y0: 0, x1: 4, y1: 4 }); // false
* isRightOfLine({ x: 3, y: 1 }, { x0: 0, y0: 0, x1: 4, y1: 4 }); // true
* ```
* @group Geometry
* @category Line Segment
* @category Point
*/
export declare function isRightOfLine(point: Cartesian, line: LineSegment): boolean;