R/dcircpurka.R

Defines functions dcircpurka

Documented in dcircpurka

dcircpurka <- function(x, m, a, rads = FALSE, logden = FALSE) {
  if ( !rads )  x <- x * pi/180
  x <- cbind( cos(x), sin(x) )
  m <- c( cos(m), sin(m) )
  den <- log(a) - log(2) - log(1 - exp(-a * pi)) - a * acos( x %*% m)
  if ( !logden )  den <- exp(den)
  den
}

Try the Directional package in your browser

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

Directional documentation built on Oct. 30, 2024, 9:15 a.m.