powered by
Get the intersection point of two straight lines given in slope–intercept form.
get_intersection(x, y)
A named vector giving the intersection, NULL if the lines do not intersect, NaN if they are identical.
NULL
NaN
A named vector with intercept ["a"] and slope ["b"].
Other geometry functions: points2equation(), vector_length()
points2equation()
vector_length()
get_intersection(x = c(a = 0, b = 1), y = c(a = 2, b = -1)) get_intersection(x = c(a = 0, b = 1), y = c(a = 2, b = 1)) x <- c(a = 0, b = 1) get_intersection(x = x, y = x)
Run the code above in your browser using DataLab