point_line_dist: Distance between point and line

Description Usage Arguments

View source: R/thin.r

Description

Compute distance between point given as (px, py) and line spanned by points (lx1, ly1) and (lx2, ly2). From http://mathworld.wolfram.com/Point-LineDistance2-Dimensional.html

Usage

1
point_line_dist(px, py, lx_1, ly_1, lx_2, ly_2)

Arguments

px

x coordinate of point outside the

py

y coordinate of point

lx_1,

x coordinate of 1st point spanning a line

ly_1,

y coordinate of 1st point spanning a line

lx_2,

x coordinate of 2nd point spanning a line

ly_2,

y coordinate of 2nd point spanning a line


gglogo documentation built on Jan. 29, 2020, 1:09 a.m.