The conjugate of q: the inverse rotation, for a unit quaternion.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | q(4) |
quaternion [x, y, z, w] |
pure function quat_conjugate(q) result(c) real(wp), intent(in) :: q(4) !! quaternion [x, y, z, w] real(wp) :: c(4) c = [-q(1:3), q(4)] end function quat_conjugate