atan3: Calculate angle between a vector and y-axis

Description Usage Arguments Details

Description

Calculate the angle between a vector and y-axis, not the x-axis as in atan2

Usage

1
atan3(x, y)

Arguments

x

The x coordinate from the (x, y) locations.

y

The y coordinate from the (x, y) location for an organism.

Details

This is a helper function. It is called in another function but is otherwise not "outward facing".

This function calculates the angle between a vector and the y-axis. The base function atan2 calculates the angle between a vector and the x-axis, which is not desirable in this case.

If the data will be aggregated, it is recommended to aggregate the data before running this function.


servosphereR documentation built on May 15, 2019, 1:05 a.m.