vec_minus_vec Function

private pure elemental function vec_minus_vec(a, b)

Elementwise vec4 - vec4

Type Bound

vec4

Arguments

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

Input vec4

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

vec4 to subtract

Return Value type(vec4)


Source Code

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

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

        end function vec_minus_vec