do.lines.cross: Given two line segments, returns TRUE if they cross, FALSE if...

Description Usage Arguments Value Examples

Description

from algorithm described at: http://stackoverflow.com/questions/7069420/check-if-two-line-segments-are-colliding-only-check-if-they-are-intersecting-n

Usage

1
do.lines.cross(start.line.one, end.line.one, start.line.two, end.line.two)

Arguments

start.line.one

list of coordinates c(x,y) for first point on first line

end.line.one

list of coordinates c(x,y) for second point on first line

start.line.two

list of coordinates c(x,y) for first point on second line

end.line.two

list of coordinates c(x,y) for second point on second line

Value

TRUE if lines cross, FALSE if lines do not

Examples

1
2
do.lines.cross(start.line.one = c(0,0), end.line.one = c(1,1),
		start.line.two = c(1,0), end.line.two = c(0,1))

bmarkslash7/bagoftricks documentation built on May 12, 2019, 10:24 p.m.