I wanted to get the angle between two points so used the ofxVec2f class and the angle() function. I had strange results. Unless I am completely miss understanding how it should work.
I tested this using the mouse position and a static point.
In the first method, I get results I would expect. Going clockwise around the point from 0 to -180 (at the 6 oclock position) then around from 180 to 0 (back at the top). These angle results are consistent no matter how far away from the point you are.
In the second method results are all over the place and the angle gets bigger the further away the two points are from each other.
I think the difference is that you are looking for the angle between two points, but ofVec2f is the angle between two vectors. It seems to work fine for me, to give the angle between an up vector and the vector between the middle of the screen and the mouse, ie:
//--------------------------------------------------------------
void testApp::mouseMoved(int x, int y ){
ofxVec2f up;
up.set(0,1);
ofxVec2f mouse;
mouse.set(ofGetWidth()/2 - x,ofGetHeight()/2 - y); // a vector from the middle of the canvas to the mouse....
cout << up.angle(mouse) << endl;
}