;; | ---------------------------------------------------------------------------- ;; | GE_VecDotProduct ;; | ---------------------------------------------------------------------------- ;; | Function : Computes the dot products of two vectors ;; | ;; | Arguments: 'v1' - First vector ;; | 'v2' - Second Vector ;; | ;; | Returns : 'scl' - The dot product of the two vectors which is a scalar ;; | value ;; | Theory: Say you have two vectors ;; | A= ax i + ay j + az k ;; | B= bx i + by j + bz k ;; | ;; | then A . B = ax.bx + ay.by + az.bz ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | ---------------------------------------------------------------------------- (defun GE_VecDotProduct ( v1 v2 ) (apply '+ (mapcar '* v1 v2)) )