Convert an array of exclusions and keep only from / to
The method will always check if from if lower than to and will swap if required.
Parameters
Name |
Description |
options.from number
(default Number.NEGATIVE_INFINITY )
|
Specify min value of zones (after inversion)
|
options.to number
(default Number.POSITIVE_INFINITY )
|
Specify max value of zones (after inversion)
|
Normalize an array of zones:
- ensure than from < to
- merge overlapping zones
The method will always check if from if lower than to and will swap if required.
Parameters
Name |
Description |
options.from number
(default Number.NEGATIVE_INFINITY )
|
Specify min value of a zone
|
options.to number
(default Number.POSITIVE_INFINITY )
|
Specify max value of a zone
|
Add the number of points per zone to reach a specified total
Parameters
numberOfPoints (number?)
Total number of points to distribute between zones
Name |
Description |
options.from number
(default Number.NEGATIVE_INFINITY )
|
Specify min value of a zone
|
options.to number
(default Number.POSITIVE_INFINITY )
|
Specify max value of a zone
|