MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / GetUnitForRange

Function GetUnitForRange

Source/3rdParty/implot/implot.cpp:905–912  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

903};
904
905inline ImPlotTimeUnit GetUnitForRange(double range) {
906 constexpr double cutoffs[ImPlotTimeUnit_COUNT] = {0.001, 1, 60, 3600, 86400, 2629800, 31557600, IMPLOT_MAX_TIME};
907 for (int i = 0; i < ImPlotTimeUnit_COUNT; ++i) {
908 if (range <= cutoffs[i])
909 return (ImPlotTimeUnit)i;
910 }
911 return ImPlotTimeUnit_Yr;
912}
913
914inline int LowerBoundStep(int max_divs, const int* divs, const int* step, int size) {
915 if (max_divs < divs[0])

Callers 2

Locator_TimeFunction · 0.85
LabelAxisValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected