Center of a range of values

### 5.5.2 Center of a range of values

The interval2center command finds the midpoint of a range of values.

- interval2center takes R, a range of values interval or a list of ranges of values.
- interval2center(R) returns the center of this range or the list of centers of these ranges.

#### Examples

interval2center(3..5)

4 |  |  |  |  |  |  |  |  |  |

interval2center([2..4,4..6,6..10])

| ⎡ ⎣ | 3,5,8 | ⎤ ⎦