checkIntersect: Check if line segments intersect

Description Usage Arguments Value Examples

View source: R/selfIntersections.R

Description

Find if two line segments intersect

Usage

1
checkIntersect(a, b, c, d, seq = FALSE)

Arguments

a

first coordinate of first line segment

b

second coordinate of first line segment

c

first coordinate of second line segment

d

second coordinate of second line segment

seq

indicator for whether the two line segments are intersecting

Value

boolean indicating if there is an intersection

Examples

1
2
 checkIntersect(c(0, 0), c(1, 1), c(2, 2), c(3, 3))
 checkIntersect(c(0, 0), c(1, 1), c(0.5, 0.5), c(2, 2))

IceCast documentation built on Aug. 16, 2017, 9:03 a.m.