cpvclamp   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/contrib/libchipmunk/cpVect.xtm

Implementation

(bind-func cpvclamp
  (lambda (v:cpVect len:cpFloat)
    (if (> (cpvdot v v) (* len len))
      (cpvmult (cpvnormalize v) len)
      v)))


Back to Index