R/rcircexp.R

Defines functions rcircexp

Documented in rcircexp

rcircexp <- function(n, lambda, rads = TRUE) {
  theta <- rexp(n, lambda)
  theta <- theta %% (2 * pi)
  if ( !rads )  theta <- theta * pi/180
  theta
}

Try the Directional package in your browser

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

Directional documentation built on Oct. 12, 2023, 1:07 a.m.