IntersectLines: Finds the intersection of two lines

Description Usage Arguments Value Examples

View source: R/IntersectLines.R

Description

IntersectLines finds the intesection of two lines

Usage

1
IntersectLines(Line1, Line2)

Arguments

Line1

Line object previously created with CreateLinePoints or CreateLineAngle

Line2

Line object previously created with CreateLinePoints or CreateLineAngle

Value

Returns a vector containing the xy-coordinates of the intersection point. In case of no intersection, the function tells the user

Examples

1
2
3
4
5
6
7
P1 <- c(0,0)
P2 <- c(1,1)
Line1 <- CreateLinePoints(P1, P2)
P3 <- c(1,-1)
P4 <- c(2,0)
Line2 <- CreateLinePoints(P3, P4)
intersection <- IntersectLines(Line1, Line2)

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