toPiInt {sdetorus}R Documentation

Wrapping of radians to its principal values

Description

Utilities for transforming a reals into [-\pi, \pi), [0, 2\pi) or [a, b).

Usage

toPiInt(x)

to2PiInt(x)

toInt(x, a, b)

Arguments

x

a vector, matrix or object for whom Arithmetic is defined.

a, b

the lower and upper limits of [a, b).

Details

Note that b is excluded from the result, see examples.

Value

The wrapped vector in the chosen interval.

Examples

# Wrapping of angles
x <- seq(-3 * pi, 5 * pi, l = 100)
toPiInt(x)
to2PiInt(x)

# Transformation to [1, 5)
x <- 1:10
toInt(x, 1, 5)
toInt(x + 1, 1, 5)

# Transformation to [1, 5]
toInt(x, 1, 6)
toInt(x + 1, 1, 6)

[Package sdetorus version 0.1.10 Index]