fold_180: Constrains numbers to 180

Description Usage Arguments Value Examples

Description

Limits a numerical vector to 180. If an element in the vector is greater than 180 then the amount it is greater than 180 by is subtracted from it. Useful for angles between two vectors, if the angle between two vectors is 180 degrees this is the maximum difference – once the angle exceeds 180 degrees the vectors begin to converge again.

Usage

1

Arguments

x

Vector of angles (in degrees)

Value

Numerical vector

Examples

1
2
sample <- seq(1, 360, 1)
fold_180(sample)

Swarchal/phenoDist documentation built on May 9, 2019, 3:25 p.m.