Symbolic element-wise 2-argument arc-tangent operation for LazyTensor
objects or standard element-wise 2-argument arc-tangent operation
otherwise.
Arguments
- x, y
input for
atan2.default()
oratan2.LazyTensor()
.
Value
See value of atan2.default()
or
atan2.LazyTensor()
.
Details
If x
is a LazyTensor
, see atan2.LazyTensor()
, else
see atan2.default()
.
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)
.
Examples
if (FALSE) {
# R base operation
atan2(0, 1)
atan2(1, 0)
# LazyTensor symbolic element-wise 2-argument arc-tangent
x <- matrix(runif(150 * 3), 150, 3) # arbitrary R matrix, 150 rows, 3 columns
y <- matrix(runif(250 * 3), 250, 3) # arbitrary R matrix, 250 rows, 3 columns
x_i <- LazyTensor(x, index = 'i') # creating LazyTensor from matrix x,
# indexed by 'i'
y_j <- LazyTensor(y, index = 'j') # creating LazyTensor from matrix y,
# indexed by 'j'
Atan2_xy <- atan2(x_i, y_j) # symbolic matrix
}