this is a quaternion class

it is meant to represent any quaternion, not only unit
quaternions/rotations that follow a specific convention. Need to check
in rotations.f90 where the homomorph should happen
This commit is contained in:
Martin Diehl 2020-01-11 03:11:45 +01:00
parent 79cafebffe
commit aefd401e8c
1 changed files with 1 additions and 2 deletions

View File

@ -435,7 +435,6 @@ pure function asArray(self)
class(quaternion), intent(in) :: self
asArray = [self%w,self%x,self%y,self%z]
if (self%w < 0) asArray = -asArray
end function asArray
@ -475,7 +474,7 @@ subroutine unitTest
type(quaternion) :: q, q_2
call random_number(qu)
if (qu(1) < 0.0_pReal) qu = -qu
qu = (qu-0.5_pReal) * 2.0_pReal
q = qu
q_2 = q + q