### 27.10.7 Length of a segment in space

See Section 26.13.2 for distances in 2D geometry.

The distance command finds the distance between two points.

- distance takes two arguments: P,Q, two points or two lists with the coordinates of the points.
- distance(P,Q) returns the distance between P and Q.

#### Example

distance(point(-1,1,1),point(1,1,1))

or:

distance([-1,1,1],[1,1,1])

2 |  |  |  |  |  |  |  |  |  |