Template Function Acts::makeDirectionUnitFromPhiTheta¶
Defined in File UnitVectors.hpp
Function Documentation¶
-
template<typename
T
>
Eigen::Matrix<T, 3, 1>Acts
::
makeDirectionUnitFromPhiTheta
(T phi, T theta)¶ Construct a normalized direction vector from phi and theta angle.
- Note
The input arguments intentionally use the same template type so that a compile error occurs if inconsistent input types are used. Avoids unexpected implicit type conversions and forces the user to explicitely cast missmatched input types.
- Parameters
phi
: is the direction angle in radian in the x-y plane.theta
: is the polar angle in radian towards the z-axis.