Atan?

Hi. I need to know how to make an object facing an another object with _rotation.
Suppose to be like
_rotation = atan(y1-y2 / x1-x2)
But i dont get it to work…
Which object is Y1 and Y2, and X1 and X2? The object thats is facing or the other object?
This is pretty simple.
Thanks!