is_pure¶
-
Quaternion.
is_pure
() → bool¶ Returns a bool value, where
True
if quaternion is pure.A pure quaternion has a scalar part equal to zero: \(\mathbf{q} = 0 + xi + yj + zk\)
\[\begin{split}\left\{ \begin{array}{ll} \mathrm{True} & \: w = 0 \\ \mathrm{False} & \: \mathrm{otherwise} \end{array} \right.\end{split}\]Returns: out – Boolean equal to True if \(q_w = 0\). Return type: bool Examples
>>> q = Quaternion() >>> q Quaternion([1., 0., 0., 0.]) >>> q.is_pure() False >>> q = Quaternion([0., 1., 2., 3.]) >>> q Quaternion([0. , 0.26726124, 0.53452248, 0.80178373]) >>> q.is_pure() True