Jayjay
It works only for horizontal movements and also you should multiply by dt to make it framerate independant.
using the same method for any movement would be
Sprite: Set X to self.X+cos(angle(self.X,self.Y,B.X,B.Y)*SPEED
Sprite: Set X to self.X+sin(angle(self.X,self.Y,B.X,B.Y)*SPEED
and if you want to be framerate independant it will look like
sprite: Set X to self.X+cos(angle(self.X,self.Y,B.X,B.Y)*SPEED*dt
Sprite: Set X to self.X+sin(angle(self.X,self.Y,B.X,B.Y)*SPEED*dt
In fact, it's exactly what "moving at angle" does
But it might lead to wiggling when the sprite reach the B point. Because you might not end up with B.X,B.Y precisely.
That's why using lerp is probably better (: you get the framerate independancy and precision.