how to calculate the way between 2 Points?

hi, i want to make a waypoint system… so i need some calculation stuff how to calculate this:

^ z
|´´´´´´´´´´. P2 (x,z)
|´´´´´´. P1 (x,z)

ok, I want that my bot is travalling from P1 to P2… i’ve tryed to get the angle beetween them but something doesn’t work…
could anybody post some Code please?
don’t look at the ´ they are only because this forum doesnt accept Tabs

[This message has been edited by MofuX (edited 11-29-2001).]

The line from P1 to P2 is (x,y) = (1-t)P1 + t*P2 where t:[0,1]

[This message has been edited by grady (edited 11-29-2001).]

Here is some docs that migth come into handy:

I found the links earlier in some forum here.