MCPcopy Create free account
hub / github.com/collin80/SavvyCAN / getMantissa

Method getMantissa

qcustomplot.cpp:5816–5821  ·  view source on GitHub ↗

! \internal Returns the decimal mantissa of \a input. Optionally, if \a magnitude is not set to zero, it also returns the magnitude of \a input as a power of 10. For example, an input of 142.6 will return a mantissa of 1.426 and a magnitude of 100. */

Source from the content-addressed store, hash-verified

5814 For example, an input of 142.6 will return a mantissa of 1.426 and a magnitude of 100.
5815*/
5816double QCPAxisTicker::getMantissa(double input, double *magnitude) const
5817{
5818 const double mag = qPow(10.0, qFloor(qLn(input)/qLn(10.0)));
5819 if (magnitude) *magnitude = mag;
5820 return input/mag;
5821}
5822
5823/*! \internal
5824

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected