Description Usage Arguments Value Examples
View source: R/DistancePointLine.R
DistancePointLine
computes the distance between a point and a line
1 | DistancePointLine(P, Line)
|
P |
Vector containing the xy-coordinates of a point |
Line |
Vector object previously created with |
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
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.