R/dot.R

Defines functions dot

Documented in dot

#' Compute the dot product between two vectors
#'
#' @param vec1 A numeric vector
#' @param vec2 Another numeric vector
#'
#' @return A numeric
#' @export
#'
#' @examples
#' dot(c(0,1), c(1,0))
dot <- function(vec1, vec2){
  sum(vec1 * vec2)
}

Try the fuzzylink package in your browser

Any scripts or data that you put into this service are public.

fuzzylink documentation built on Aug. 18, 2025, 5:29 p.m.