vec_minus_vec Function

private pure elemental function vec_minus_vec(a, b)

vec3 - vec3

Type Bound

vector

Arguments

Type IntentOptional Attributes Name
class(vector), intent(in) :: a

Input vector

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

vec3 to subtract

Return Value type(vector)


Source Code

        type(vector) pure elemental function vec_minus_vec(a, b)
            !! vec3 - vec3
            !> Input vector
            class(vector), intent(IN) :: a
            !> vec3 to subtract
            type(vector),  intent(IN) :: b

            vec_minus_vec = vector(a%x - b%x, a%y - b%y, a%z - b%z)

        end function vec_minus_vec