Length of a segment in space

### 25.10.7 Length of a segment in space

See Section 24.13.2 for distances in two-dimensional 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 |  |  |  |  |  |  |  |  |  |