assuming you are at a place where the ball is just contacting the brick;
You will have to create a structure that holds a point located on each edge, and a vector for each edge that is the edge's normal.
Give that structure a method that iterates through each point, creates a vector that is the difference between the ball's center & the point, dot it to the corresponding normal, and only one of the 4 results will be a positive number, that's the edge that has intersected.
pseudo code:
struct brick
Vector min, max, L, R, T, B; //letters repre points on edges
Vector normalLeft, normalRight, normalTop, normalBottom;
//ctor
Brick(min, max)
{
//generate values for all the fields above
}
vector normalOfEdgeHit(Vector ballCtr)
{
foreach(point i = L, R, T, B)
{
if(Dot(ballCtr - i, normal[i]) > 0)
{
return normal[i];
}
}
}
in the following diagram, it would return normalB. notice how all the other normals point away from the ball (thus would return values less than 0).
The points can be located anywhere on the edge, they do not need to be in the center.
It is possible to have two normals return positive when close to the corner. In that case, you must determine distance from point to line (as if the brick's edge were an infinitely long line) for both edges. Whichever is a greater distance is the edge that has intersected.
