R/rwrapcauchy.R

Defines functions rwrapcauchy

Documented in rwrapcauchy

rwrapcauchy <- function(n, m, rho, rads = TRUE) {
  a <-  -log(rho)
  if ( !rads )  m <- m / 180 * pi
  theta <- rcauchy(n, m, a)
  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.