Here are my range checking functions for comparing 1D, 2D and 3D.
The line
null=make vector3(1) should be at the start of the program, the functions at the end.
Use just like any DBPro command
=range1D(pointA,pointB)
=range2D(aX,aZ,bX,bZ)
=fastRange2D(aX,aZ,bX,bZ)
=range3D(aX,aY,aZ,bX,bY,bZ)
null=make vector3(1)
function range(ax#,bx#)
result#=abs(ax#-bx#)
endfunction result#
function range2D(ax#,az#,bx#,bz#)
dx#=abs(ax#-bx#)
dz#=abs(az#-bz#)
result#=sqrt((dx#*dx#)+(dz#*dz#))
endfunction result#
function fastRange2D(ax#,az#,bx#,bz#)
result#=abs(ax#-bx#)+abs(az#-bz#)
endfunction result#
function range3D(ax#,ay#,az#,bx#,by#,bz#)
set vector3 1,ax#-bx#,ay#-by#,az#-bz#
result#=length vector3(1)
endfunction result#
Pneumatic Dryll
