Quaternion.z
Quaternion.z : Third element of the vector part of the Quaternion.
code
Given a quaternion ,
the third element of the vector part is .
Returns:
: **q\_z** – Third element of vector part of the quaternion.
Return type:
: float
Examples
```defaultq = Quaternion([2.0, -3.0, 4.0, -5.0]) q.view() Quaternion([ 0.27216553, -0.40824829, 0.54433105, -0.68041382])
q.z -0.6804138174397717
code
It can also be accessed directly, treating the Quaternion as an array:
```default
>>> q[3]
-0.6804138174397717