Learn R Programming

tectonicr (version 0.4.6)

deviation_norm: Normalize Angle Between Two Directions

Description

Normalizes the angle between two directions to the acute angle in between, i.e. angles between 0 and 90\(^\circ\)

Usage

deviation_norm(x, y = NULL)

Value

numeric vector, acute angles between two directions, i.e. values between 0 and 90\(^\circ\)

Arguments

x, y

Minuend and subtrahend. Both numeric vectors of angles in degrees. If y is missing, it treats x as difference. If not, length of subtrahend y is either 1 or equal to length(x).

Author

Tobias Stephan

Examples

Run this code
deviation_norm(175, 5)
deviation_norm(c(175, 95, 0), c(5, 85, NA))
deviation_norm(c(-5, 85, 95, 175, 185, 265, 275, 355, 365))

Run the code above in your browser using DataLab