Template Function librapid::polar#
Defined in File complex.hpp
Function Documentation#
-
template<typename T>
Complex<T> librapid::polar(const T &rho, const T &theta)# Return a complex number from polar coordinates.
Given a radius,
rho
, and an angle,theta
, this function returns the complex number \( \rho e^{i\theta} \).The function returns NaN, infinity or zero based on the input values of rho.
- Template Parameters
T – Scalar type of the complex number
- Parameters
rho – Radius of the polar coordinate system
theta – Angle of the polar coordinate system
- Returns
Complex number in polar form.