Previous Up Next

2.34.3  Center of an interval : interval2center

interval2center takes as argument an interval or a list of intervals.
interval2center returns the center of this interval or the list of centers of these intervals.
Input :

interval2center(3..5)

Output :

4

Input :

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

Output :

[3,5,8]

Previous Up Next