MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / padDerivedRange

Method padDerivedRange

app/src/UI/Widgets/MultiPlot.cpp:778–788  ·  view source on GitHub ↗

* @brief Adjusts m_minY/m_maxY when data-derived bounds need padding. */

Source from the content-addressed store, hash-verified

776 * @brief Adjusts m_minY/m_maxY when data-derived bounds need padding.
777 */
778void Widgets::MultiPlot::padDerivedRange()
779{
780 applyDerivedYBounds();
781
782 m_maxY = std::ceil(m_maxY);
783 m_minY = std::floor(m_minY);
784 if (DSP::almostEqual(m_maxY, m_minY)) {
785 m_minY -= 1;
786 m_maxY += 1;
787 }
788}
789
790/**
791 * @brief Selects the padding strategy for the current m_minY/m_maxY pair.

Callers

nothing calls this directly

Calls 3

ceilFunction · 0.85
floorFunction · 0.85
almostEqualFunction · 0.85

Tested by

no test coverage detected