mu2theta2: Calculate the angle of a 2-dimensional vector

Description Usage Arguments Details

View source: R/mu2theta2.R

Description

Calculates the angle of a vector with respect to the vector (1,0).

Usage

1

Arguments

mu

a vector of length 2 or a N x 2 matrix of means in two dimensions

Details

Returns the angle needed to rotate (1,0) counterclockwise to match the input vector. atan(y/x) + 0 if x >= 0 and y >= 0 (Q1) pi if x < 0 and y > 0 (Q2) pi if x < 0 and y <= 0 (Q3) 2pi if x >= 0 and y < 0 (Q4)


ahfoss/pkbc documentation built on June 4, 2017, 3:21 a.m.