isPointOnSeg: Check if a point is on a segment

View source: R/geometry.R

isPointOnSegR Documentation

Check if a point is on a segment

Description

This function checks if a point P is on a segment AB.

Usage

isPointOnSeg(xPoint, yPoint, xStart, yStart, xEnd, yEnd)

Arguments

xPoint

x coordinate of point P.

yPoint

y coordinate of point P.

xStart

x coordinate of point A.

yStart

y coordinate of point A.

xEnd

x coordinate of point B.

yEnd

y coordinate of point B.

Value

Logical; whether the point is on the segment.

Examples

isPointOnSeg(2, 3, 1, 2, 3, 4)
isPointOnSeg(2, 3, 1, 2, 3, 8)
isPointOnSeg(4, 5, 1, 2, 3, 4)


henna documentation built on Feb. 17, 2026, 9:08 a.m.