cross_3d_c Function

function cross_3d_c(a, b) result(c)

Arguments

Type IntentOptional Attributes Name
complex(kind=8), dimension(3) :: a
complex(kind=8), dimension(3) :: b

Return Value complex(kind=8), dimension(3)


Source Code

function cross_3d_c(a,b) result(c)
  complex(8),dimension(3) :: a,b
  complex(8),dimension(3) :: c
  c(1) = a(2)*b(3) - a(3)*b(2)
  c(2) = a(3)*b(1) - a(1)*b(3)
  c(3) = a(1)*b(2) - a(2)*b(1)
end function cross_3d_c