马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×

- ;; ! ****************************************************************************
- ;; ! GE_VecNormalize
- ;; ! ****************************************************************************
- ;; ! Function : Normalize a vector (scale to a unit length)
- ;; !
- ;; ! Arguments: 'v' - Vector to be normalized
- ;; !
- ;; ! Returns : 'v' - The normalized vector
- ;; !
- ;; ! Comments: Normalizing results in the vector being reduced to a unit length
- ;; ! (C) 1999-2004, Four Dimension Technologies, Bangalore
- ;; ! e-mail : [email]rakesh.rao@4d-technologies.com[/email]
- ;; ! Web : [url]www.4d-technologies.com[/url]
- ;; ! ****************************************************************************
- ;; 返回向量的单位向量
- (defun GE_VecNormalize (v)
- (GE_VecScale v (/ 1.0 (distance v (list 0.0 0.0 0.0))))
- )
|