Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Const Pi = 4 * ATN(1)
- sub pythag(x1 as long,y1 as long,x2 as long,y2 as long,byref x as double,byref y as double,byref d as double)
- dim as double x0=0,y0=0,d0=0
- x0=0
- y0=0
- d0=0
- x0=x2-x1
- y0=y2-y1
- d0=(x0^2)+(y0^2)
- select case d0
- case is > 0
- d0=sqr(d0)
- end select
- x=x0/d0
- y=y0/d0
- d=d0
- end sub
Add Comment
Please, Sign In to add comment