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