Construct 3D rotation from quaternion (the quaternion needs not to be normalized).
(q)
| 59 | return jp.concatenate([-x[..., :3], x[..., 3:]], axis=-1) |
| 60 | |
| 61 | def quat_normalize(q): |
| 62 | """ |
| 63 | Construct 3D rotation from quaternion (the quaternion needs not to be normalized). |
| 64 | """ |
| 65 | q = quat_unit(quat_pos(q)) # normalized to positive and unit quaternion |
| 66 | return q |
| 67 | |
| 68 | def quat_inverse(x): |
| 69 | """ |
no test coverage detected