DistancePointLine {LearnGeom} | R Documentation |
Computes the distance between a point and a line
Description
DistancePointLine
computes the distance between a point and a line
Usage
DistancePointLine(P, Line)
Arguments
P |
Vector containing the xy-coordinates of a point |
Line |
Vector object previously created with |
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
P <- c(2,1)
P1 <- c(0,0)
P2 <- c(1,1)
Line <- CreateLinePoints(P1, P2)
d <- DistancePointLine(P, Line)
[Package LearnGeom version 1.5 Index]