Return the inverse of the quaternion
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(quat_t), | intent(in) | :: | q | The quaternion of interest |
elemental function inv(q) result(o)
!! Return the inverse of the quaternion
type(quat_t),intent(in)::q
!! The quaternion of interest
type(quat_t)::o
o = conjg(q)/norm2(q)**2
end function inv