Set and check numeric quantile scales. Provide an input domain and this library will convert it to a numeric quantile output range. This is different from the Arduino map() function because this library can handle a non-uniform input range.
This example takes an input domain of:
and converts it to the quantile output range:
Create a new instance and provide an integer for the maximum number of threshold levels. For example; set the level_count to 3 if you have levels of low, medium, and high. If you need more levels, this library will dynamically allocate an array to accommodate the size you provide the constructor.
Provide an integer for a level index and an integer, float, or double for the threshold value. This is not zero based, the first level starts at 1. You must also call setMaxLevel() at the end to set an upper bounds of your last level.
Provide an integer, float, or double to set the upper-bounds threshold of the last level.
Provide an integer for the level index, and this returns the value originally provided to setLevel().
Returns the value originally provided to setMaxLevel().