distance


(distance  pointA  pointB)

This function returns the 3d distance between 2 points pointA and pointB; points can be 2d or 3d.

Arguments

pointA  first point (2d or 3d)

pointB  second point (2d or 3d)

Return

2d or 3d distance between the 2 points, as double value

Example

(distance '(1 1 1) '(2 2))  1.4142135623731 (2d distance)
(distance '(1 1 1) '(2 2 2))  1.73205080756888 (3d distance)

Remarks

if any of pontA or pointB is only 2d, then the distance is calculated as 2d distance (ignores any Z coordinate)



©  Bricsys NV. All rights reserved.