MCPcopy Create free account
hub / github.com/SpartanJ/eepp / countDigits

Function countDigits

include/eepp/math/math.hpp:93–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91
92/** @return The number of digits in a number. */
93template <typename T> static T countDigits( T num ) {
94 return num == 0 ? 1 : (T)log10( std::abs( num ) ) + 1;
95}
96
97}} // namespace EE::Math
98

Callers 2

getLineNumberDigitsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected