* @brief Pads a data-derived [min, max] range and rounds to integer bounds. */
| 818 | * @brief Pads a data-derived [min, max] range and rounds to integer bounds. |
| 819 | */ |
| 820 | void Widgets::Plot::padDerivedRange(double& min, double& max, const bool addPadding) |
| 821 | { |
| 822 | applyAxisPadding(min, max, addPadding); |
| 823 | max = std::ceil(max); |
| 824 | min = std::floor(min); |
| 825 | if (DSP::almostEqual(max, min) && addPadding) { |
| 826 | min -= 1; |
| 827 | max += 1; |
| 828 | } |
| 829 | } |
| 830 | |
| 831 | /** |
| 832 | * @brief Selects the padding strategy for a [min, max] pair before rounding. |
nothing calls this directly
no test coverage detected