zero_to_2pi {BAMBI}R Documentation

Wrap angles into [-pi, pi] or [0, 2*pi]

Description

Wrap angles into [-pi, pi] or [0, 2*pi]

Usage

zero_to_2pi(x)

minuspi_to_pi(x)

Arguments

x

numeric vector or matrix or data.frame.

Details

minuspi_to_pi wraps x into [-pi, pi], while zero_to_pi wraps x into [0, 2*pi].

Examples

dat <- matrix(runif(100, -pi, pi), ncol=2)
dat1 <- zero_to_2pi(dat)
dat2 <- minuspi_to_pi(dat1)
all.equal(dat, dat2)

[Package BAMBI version 2.3.5 Index]