crossproduct Function

private elemental function crossproduct(lhs, rhs) result(cross)

Compute the cross product.

where , and are the components of the vectors.

 type(vector) :: pt(0:2)
 pt(1) = 2 * ex
 pt(2) = ex
 pt(0) = pt(1).cross.pt(2)
 print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)

Arguments

TypeIntentOptionalAttributesName
class(vector), intent(in) :: lhs

Left hand side.

type(vector), intent(in) :: rhs

Right hand side.

Return Value type(vector)

Cross product vector.


Contents

None