|
inlineconstexpr |
Callable object computing a quaternion from its spherical representation.
This function build quaternions in a way similar to the way polar builds complex numbers from a spherical representation of an \(\mathbb{R}^4\) element.
from_spherical takes as inputs a (positive) magnitude and a point on the hypersphere, given by three angles. The first of these, theta has a natural range of \(-\pi\) to \(+\pi\), and the other two have natural ranges of \(-\pi/2\) to \(+\pi/2\) (as is the case with the usual spherical coordinates in \(\mathbb{R}^3\)).
Defined in header
Parameters
rho
: the modulustheta
, phi1
, phi2
: angles in radianReturn value
the quaternion value