Constrain camera between two actors?

I'm playing around with a simple top-down racing game and would like to have the camera's position be based on the avarage of the two racing cars' position, but I can't get anything to work. I have an actor that I would like to place between these cars (and let it be the camera control) but I don't know how to do the math to place the actor between them.
Anyone?
Anyone?
Comments
actor3.x = (actor1.x + actor2.x)/2
actor3.y = (actor1.y + actor2.y)/2
Hope this helps.