Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(vector) | :: | vec |
FUNCTION VecNegate(vec)
! PURPOSE OF THIS SUBROUTINE:
! This subroutine negates the input vector and returns that vector.
! REFERENCE:
! Graphic Gems.
IMPLICIT NONE
! SUBROUTINE ARGUMENT DEFINITIONS:
type(vector) vec
type(vector) VecNegate
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
! na
VecNegate%x=-vec%x
VecNegate%y=-vec%y
VecNegate%z=-vec%z
return
END FUNCTION VecNegate