MCPcopy Create free account
hub / github.com/SatDump/SatDump / GetUnitForRange

Function GetUnitForRange

src-core/imgui/implot/implot.cpp:859–866  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

857};
858
859inline ImPlotTimeUnit GetUnitForRange(double range) {
860 static double cutoffs[ImPlotTimeUnit_COUNT] = {0.001, 1, 60, 3600, 86400, 2629800, 31557600, IMPLOT_MAX_TIME};
861 for (int i = 0; i < ImPlotTimeUnit_COUNT; ++i) {
862 if (range <= cutoffs[i])
863 return (ImPlotTimeUnit)i;
864 }
865 return ImPlotTimeUnit_Yr;
866}
867
868inline int LowerBoundStep(int max_divs, const int* divs, const int* step, int size) {
869 if (max_divs < divs[0])

Callers 2

Locator_TimeFunction · 0.85
LabelAxisValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected