well it works.
Rem Project: Dark Basic Pro Project
Rem Created: Tuesday, June 29, 2010
Rem ***** Main Source File *****
x1 as float
y1 as float
x2 as float
y2 as float
ang as float
x2=rnd(screen width()-200)+100
y2=rnd(screen height()-200)+100
ang=rnd(36000)/100.0
do
cls
x1=mousex()
y1=mousey()
ang=ang+sign((x2-x1)*cos(ang-90)+(y2-y1)*sin(ang-90))*.1
circle x1,y1,20
line x1,y1,x2,y2
circLineAng(x2,y2,20,ang)
sync
loop
function circLineAng(x as integer, y as integer, r as integer, ang as float)
ink rgb(255,255,255),rgb(255,255,255)
circle x,y,r
ink rgb(255,0,0),rgb(255,0,0)
line x,y,x+cos(ang)*r,y+sin(ang)*r
endfunction
function sign(a as float)
if a>0 then exitfunction 1
if a<0 then exitfunction -1
endfunction 0
[dbpro but the concept still applies]
Honestly... I'm not quite sure why the angle is 90 degrees over X_X
Is't life, I ask, is't even prudence, to bore thyself and bore thy students?