R/computeParallelLineCoef.R

Defines functions computeParallelLineCoef

Documented in computeParallelLineCoef

#' Compute the coeffcients of line paralel to a line and passing through a point
#' 
#' @param slope A numeric of slope of line that is parallel.
#' @param point_coord A vector of point coordinates that line passed through, where point1_coord[1] is the X-axis coordinate while point1_coord[2] is the Y-axis coordinate.
#' @export

computeParallelLineCoef <- function(slope, point_coord=c(0,0)){
  m <- slope
  int <- point_coord[2] - m * point_coord[1]
  return(c(slope=m,intercept=int))
}
msxakk89/dat documentation built on Aug. 3, 2020, 6:39 p.m.