Handbook
Glossary
cpvclamp ( v1: cpVect len -- v2: cpVect )
Vocabulary
chipmunk
.
ffi
Inputs
v1
a
cpVect
len
an
object
Outputs
v2
a
cpVect
Definition
USING:
kernel
math
typed
;
IN:
chipmunk.ffi
TYPED:
cpvclamp
( v1: cpVect len -- v2: cpVect )
2dup
[
dup
cpvdot
]
[
sq
]
2bi*
>
[
[
cpvnormalize
]
dip
cpvmult
]
[
drop
]
if
;
inline