Calculate a range of number to be displayed,
with the active number to be centered in the range if possible.
Parameters:
Name | Type | Description |
---|---|---|
active |
number
|
The active number to be centered |
minPossibleIndex |
number
|
Minimum possible number |
maxPossibleIndex |
number
|
Maximum possible number |
maxRange |
number
|
Maximum range of number to be displayed each time |
Return a tuple
including minimum and maximum number of the range [Min, Max]
Array.<number>