#' Compute the coordinates of the intersection of two lines
#'
#' @param m1 A numeric of the slope of the first line.
#' @param b1 A numeric of the intercept of the first line.
#' @param m2 A numeric of the slope of the second line.
#' @param b2 A numeric of the intercept of the second line.
#' @return A vector of coordinates where the two lines intersect.
#' @export
computeIntersectionOfLines <- function(m1,b1,m2,b2){
x <- (b2-b1) / (m1-m2)
y <- x*m1 + b1
o <- c(x,y)
names(o) <- c("x", "y")
return(o)
}
# t
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.