![]() |
Prev | Next |
theta = atan2(
y,
x)
\theta \in [ - \pi , + \pi ]
such that
\[
\begin{array}{rcl}
\sin ( \theta ) & = & y / \sqrt{ x^2 + y^2 } \\
\cos ( \theta ) & = & x / \sqrt{ x^2 + y^2 }
\end{array}
\]
atan2
,
for the case where both arguments are float
or both arguments are double
,
is included in the CppAD
namespace
(the corresponding results has the same type as the arguments).
The type Base can be any type in the
AD levels above
above float
or double
.
const AD<
Base> &
y
const VecAD<
Base>::reference &
y
const AD<
Base> &
x
const VecAD<
Base>::reference &
x
AD<
Base>
theta