diff --git a/src/rotations.f90 b/src/rotations.f90 index 3a64f27b9..5090261e6 100644 --- a/src/rotations.f90 +++ b/src/rotations.f90 @@ -65,6 +65,7 @@ module rotations procedure, public :: asRotationMatrix !------------------------------------------ procedure, public :: fromRotationMatrix + procedure, public :: fromEulerAngles !------------------------------------------ procedure, public :: rotVector procedure, public :: rotTensor @@ -143,7 +144,16 @@ subroutine fromRotationMatrix(self,om) self%q = om2qu(om) end subroutine +!--------------------------------------------------------------------------------------------------- +subroutine fromEulerAngles(self,eu) + class(rotation), intent(out) :: self + real(pReal), dimension(3), intent(in) :: eu + + self%q = eu2qu(eu) + +end subroutine +!--------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------- !> @author Marc De Graef, Carnegie Mellon University