geometry
distance
find the distance between two points, or a point and a line
Calling Sequence
Parameters
Description
Examples
distance(P1, P2)
distance(P1, l)
P1, P2
-
points
l
line
The routine computes the distance between two points P1 and P2 or between a point P1 and a line l.
The command with(geometry,distance) allows the use of the abbreviated form of this command.
withgeometry:
pointA,a,b,pointB,c,d:
distanceA,B
a−c2+b−d2
assumem≠0:
linel,mx+ny=w,x,y:
distanceA,l
am~+bn−wm~2+n2
distanceB,l
cm~+dn−wm~2+n2
See Also
geom3d[distance]
geometry[SensedMagnitude]
Student[Precalculus][Distance]
Download Help Document