R/cosd.R

Defines functions cosd

Documented in cosd

#' Computes the cosine of an angle expressed in decimal degrees.
#'
#' @param degrees either a number or a numeric vector of angles in decimal degrees.
#'
#' @return number or numeric vector.
#'
#' @author Luca Butikofer
#'
#' @export
#'
#' @examples
#' cosd(90)
#' plot(seq(0,360,1), cosd(seq(0,360,1)), type='l')

cosd<-function(degrees) {
  sine<-cos(degrees*pi/180)
  return(sine)
}

Try the Biolinv package in your browser

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

Biolinv documentation built on March 30, 2021, 5:13 p.m.