cocos2d/external/chipmunk/include/chipmunk/cpVect.h
static inline cpVect
cpvslerpconst(const cpVect v1, const cpVect v2, const cpFloat a)
{
	cpFloat dot = cpvdot(cpvnormalize(v1), cpvnormalize(v2));
	cpFloat omega = cpfacos(cpfclamp(dot, -1.0f, 1.0f));
	
	return cpvslerp(v1, v2, cpfmin(a, omega)/omega);
}
/// Spherical linearly interpolate between v1 towards v2 by no more than angle a radians
Spherical linearly interpolate between v1 towards v2 by no more than angle a radians
Spherical linearly interpolate between v1 towards v2 by no more than angle a radians
static inline cpVect
cpvslerpconst(const cpVect v1, const cpVect v2, const cpFloat a)
{
	cpFloat dot = cpvdot(cpvnormalize(v1), cpvnormalize(v2));
	cpFloat omega = cpfacos(cpfclamp(dot, -1.0f, 1.0f));
	return cpvslerp(v1, v2, cpfmin(a, omega)/omega);
}
static inline cpVect cpvslerpconst ( const cpVect v1 , const cpVect v2 , const cpFloat a ) { cpFloat dot = cpvdot ( cpvnormalize ( v1 ) , cpvnormalize ( v2 ) ) ; cpFloat omega = cpfacos ( cpfclamp ( dot , -1.0f , 1.0f ) ) ; return cpvslerp ( v1 , v2 , cpfmin ( a , omega ) / omega ) ; }
Spherical linearly interpolate between v1 towards v2 by no more than angle a radians
Spherical linearly interpolate between v1 towards v2 by no more than angle a radians