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

Function signClampedRange

app/src/UI/Widgets/Plot.cpp:725–732  ·  view source on GitHub ↗

* @brief Reports whether a configured plot range hard-clamps the data into one sign, * so the samples cannot be bipolar and the per-frame scan can be skipped. A * degenerate range (pltMin == pltMax, including both zero) auto-scales instead, * so it is not a clamp. */

Source from the content-addressed store, hash-verified

723 * so it is not a clamp.
724 */
725static bool signClampedRange(const DataModel::Dataset& dataset)
726{
727 if (!DSP::notEqual(dataset.pltMin, dataset.pltMax))
728 return false;
729
730 return (dataset.pltMin >= 0.0 && dataset.pltMax >= 0.0)
731 || (dataset.pltMin <= 0.0 && dataset.pltMax <= 0.0);
732}
733
734/**
735 * @brief Refreshes the finite Y extremes that drive the area fill's bipolarity from

Callers 1

updateDataExtremesMethod · 0.85

Calls 1

notEqualFunction · 0.85

Tested by

no test coverage detected