R/multiply.R

Defines functions multiply

Documented in multiply

#' Multiplies two numbers
#'
#' Performs multiplication of two integer or numeric scalars.
#'
#' @param x,y Scalar values to multiply
#'
#' @seealso [prod()]
#'
#' @examples
#' multiply(2, 3)
#'
#' @export
multiply <- function(x, y) {
  stopifnot(length(x) == 1)
  stopifnot(length(y) == 1)
  x * y
}
krlmlr/tic.package documentation built on May 17, 2022, 4:23 p.m.