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

Function AxisPrecision

Source/3rdParty/implot/implot.cpp:1628–1631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1626//-----------------------------------------------------------------------------
1627
1628static inline int AxisPrecision(const ImPlotAxis& axis) {
1629 const double range = axis.Ticker.TickCount() > 1 ? (axis.Ticker.Ticks[1].PlotPos - axis.Ticker.Ticks[0].PlotPos) : axis.Range.Size();
1630 return Precision(range);
1631}
1632
1633static inline double RoundAxisValue(const ImPlotAxis& axis, double value) {
1634 return RoundTo(value, AxisPrecision(axis));

Callers 1

RoundAxisValueFunction · 0.85

Calls 3

TickCountMethod · 0.80
PrecisionFunction · 0.70
SizeMethod · 0.65

Tested by

no test coverage detected