--- title: pointNearToLineSegment status: published category: primitives group: Function author: api date: 06/23/2023 order: 67 ---Public Function Get whether a point is within a certain distance from a line segment. ##### Parameters `A` ```ts VecLike ``` The point to check. `p1` ```ts VecLike ``` The polyline's first point. `p2` ```ts VecLike ``` The polyline's second point. `distance` (optional) ```ts number ``` The mininum distance that qualifies a hit. ##### Returns ```ts boolean ``` ##### References [VecLike](/gen/primitives/VecLike-type)