quat_prod Subroutine

public subroutine quat_prod(p, q, pq, normalize)

Calculates the product of two quaternions

Arguments

Type IntentOptional Attributes Name
real(kind=rp), intent(in), dimension(4) :: p

Quaternion.

real(kind=rp), intent(in), dimension(4) :: q

Quaternion.

real(kind=rp), intent(out), dimension(4) :: pq

Product of p and q. This is a unit quaternion if normalize is .true..

logical, intent(in), optional :: normalize

Whether to normalize the product, defaults to .true..