# Center of a range of values: interval2center

### 5.37.2 Center of a range of values: interval2center

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

- interval2center takes one argument:
  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.

- Input:
  interval2center(3..5)
  Output:

  4

- Input:
  interval2center([2..4,4..6,6..10])
  Output:

  ⎡ ⎣ | 3,5,8 | ⎤ ⎦