DistancePointLine: Computes the distance between a point and a line

Description Usage Arguments Value Examples

View source: R/DistancePointLine.R

Description

DistancePointLine computes the distance between a point and a line

Usage

1

Arguments

P

Vector containing the xy-coordinates of a point

Line

Vector object previously created with CreateLinePoints or CreateLineAngle

Value

Returns the distance between a point and a line. This distance corresponds to the distance between the point and its orthogonal projection into the line

Examples

1
2
3
4
5
P <- c(2,1)
P1 <- c(0,0)
P2 <- c(1,1)
Line <- CreateLinePoints(P1, P2)
d <- DistancePointLine(P, Line)

Example output



LearnGeom documentation built on July 14, 2020, 5:06 p.m.