atan2d | R Documentation |
Calculates the value of the "two-argument arc-tangent" for each element of
(y
, x
) in degrees in a manner compatible with GNU Octave/MATLAB.
atan2d(y, x)
y |
A numeric vector containing values in degrees |
x |
A numeric vector containing values in degrees |
The "two-argument arc-tangent" of each element of (y
, x
)
in degrees. Note: "The arc-tangent of two arguments atan2(y, x)
returns the angle between the x-axis and the vector from the origin
to (x, y), i.e., for positive arguments atan2(y, x) == atan(y/x)."
Source: Trig
(base).
Note: If you have a radian (rad) angle value, use atan2
instead.
Rik Wehbring (GNU Octave atan2d), Irucka Embry
John W. Eaton, David Bateman, Søren Hauberg, and Rik Wehbring (November 2022). GNU Octave: A high-level interactive language for numerical computations: Edition 7 for Octave version 7.3.0. https://docs.octave.org/octave.pdf. Page 554.
library(iemisc)
# Examples from GNU Octave atan2d
atan2d (a <- seq(-1, 1, by = 0.1), b <- seq(1, -1, by = -0.1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.