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.
#' @author Alexander Kheirallah ([email protected]).
#' @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 March 25, 2020, 3:18 p.m.