How do you calculate the angle between one object and another assuming your first object is your origin and the up vector is, well up? I struggled with this problem in android and java for about six hours and there wasn't any really good questions or answers that gave a correct way to calculate it.
If the question is not super clear: I have an object on the screen and I want to know what the angle is from this object with up being the y axis (or 90 degrees) to another object on the screen. So if the first object is at 1,1 and the second object is at 2,2, then the angle should be 315. This is because 0 degrees is to the right, 90 degrees is up (y axis), 180 degrees is left, and 270 degrees is down.