cocos2d/external/chipmunk/include/chipmunk/cpVect.h
static inline cpVect cpvnormalize(const cpVect v)
{
	// Neat trick I saw somewhere to avoid div/0.
	return cpvmult(v, 1.0f/(cpvlength(v) + CPFLOAT_MIN));
}
/// Returns a normalized copy of v.
Returns a normalized copy of v.
Returns a normalized copy of v .
static inline cpVect cpvnormalize(const cpVect v)
{
	return cpvmult(v, 1.0f/(cpvlength(v) + CPFLOAT_MIN));
}
static inline cpVect cpvnormalize ( const cpVect v ) { return cpvmult ( v , 1.0f / ( cpvlength ( v ) + CPFLOAT_MIN ) ) ; }
Returns a normalized copy of v.
Returns a normalized copy of v .
// Neat trick I saw somewhere to avoid div/0.