R/triangle.R

Defines functions area_triangle

Documented in area_triangle

#' Triangle
#'
#' @param base numeric the base of the triangle
#' @param height numeric the height of the triangle
#'
#' @return  numeric value of the area of the triangle
#'
#' @export
#'
#' @example # area_triangle(3, 2)
area_triangle <- function(base, height) {
  base * height / 2
}
andreamelloncelli/shapes3 documentation built on July 5, 2020, 12:20 a.m.