anticlockwise_rotation Function

private function anticlockwise_rotation(x, t)

Arguments

Type IntentOptional AttributesName
real(kind=rp), intent(in), DIMENSION(2):: x
real(kind=rp), intent(in) :: t

Return Value real(kind=rp), DIMENSION(2)


Contents


Source Code

  FUNCTION anticlockwise_rotation(x,t)
    IMPLICIT NONE
    REAL(rp), DIMENSION(2), INTENT(IN) :: x
    REAL(rp), INTENT(IN) :: t ! Angle in radians
    REAL(rp), DIMENSION(2) :: anticlockwise_rotation

    anticlockwise_rotation(1) = x(1)*COS(t) - x(2)*SIN(t)
    anticlockwise_rotation(2) = x(1)*SIN(t) + x(2)*COS(t)
  END FUNCTION anticlockwise_rotation