This snippet will return the angle of a vector, relative to the origin.

[0,-1] = 0 degrees (pointing up)
[1,0] = 90 degrees (pointing right)
[0,1] = 180 degrees (pointing down)
[-1,0] = 270 degrees (pointing left)

[pascal]
function Angle(X,Y: single): single;
begin
Result := 0;
if X = 0 then
if Y > 0 then Result := 180
else Result := 0;
Result := 180+RadToDeg(Arctan2(-X,Y));
end;
[/pascal]

Great thread! Would love to see some more snippets.