project2D/CollisionManager.cpp
//--------------------------------------------------------------------------------------
// Project: Project the Vector3 for SAT collision testing.
//
// Param:
//		a: A Vector3 a.
//		b: A Vector3 b
//
// Returns:
//		Vector3: Returns the Vector3 projection of an object.
//--------------------------------------------------------------------------------------
Project the Vector3 for SAT collision testing.
Param:
a: A Vector3 a.
b: A Vector3 b

Returns the Vector3 projection of an object.
Project the Vector3 for SAT collision testing . Param : a : A Vector3 a . b : A Vector3 b Returns the Vector3 projection of an object .
Vector3 CollisionManager::Project(Vector3& a, Vector3& b)
{
	Vector3 result;
	result.x = a.dot(b) / ((float)pow(b.x, 2) + (float)pow(b.y, 2)) * b.x;
	result.y = a.dot(b) / ((float)pow(b.x, 2) + (float)pow(b.y, 2)) * b.y;
	return result;
}
Vector3 CollisionManager :: Project ( Vector3 & a , Vector3 & b ) { Vector3 result ; result . x = a . dot ( b ) / ( ( float ) pow ( b . x , 2 ) + ( float ) pow ( b . y , 2 ) ) * b . x ; result . y = a . dot ( b ) / ( ( float ) pow ( b . x , 2 ) + ( float ) pow ( b . y , 2 ) ) * b . y ; return result ; }
Project: Project the Vector3 for SAT collision testing.
Project : Project the Vector3 for SAT collision testing .