It should only need two points, as it figures out the x difference and ydifference which is used to find the angle to get from point A to point B. It works fine as far as I know.
Here's a test for it:
int screenx=ImageWidth(screen);
int screeny=ImageHeight(screen);
void Autoexec()
{
int done;
while(!done)
{
RectFill(0,0,screenx,screeny,rgb(0,0,0),screen);
Printstring(0,0,screen,0,str(atan2(mouse.x,mouse.y,screenx/2,screeny/2) ) );
Rect(mouse.x,mouse.y,mouse.x+8,mouse.y+8,rgb(255,255,255),screen);
Line(mouse.x,mouse.y,screenx/2,screeny/2,rgb(20,102,255),screen);
Line(mouse.x+8,mouse.y,screenx/2,screeny/2,rgb(20,102,255),screen);
Line(mouse.x,mouse.y+8,screenx/2,screeny/2,rgb(20,102,255),screen);
Line(mouse.x+8,mouse.y+8,screenx/2,screeny/2,rgb(20,102,255),screen);
Showpage();
}
exit("");
}
---
Edit: Crap! The example shows that it goes from x2, y2 to x1, y1. I think I screwed up there, but that's easily fixable with a little tweaking.
Also: I note that this function doesn't do that much, really. If I did anything more, it'd be in a demo of some sort.