check_intersect: Check if line segments intersect

Description Usage Arguments Value Examples

Description

Find if two line segments intersect

Usage

1
check_intersect(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
 check_intersect(c(0, 0), c(1, 1), c(2, 2), c(3, 3))
 check_intersect(c(0, 0), c(1, 1), c(0.5, 0.5), c(2, 2))

IceCast documentation built on June 24, 2019, 9:03 a.m.