MCPcopy Create free account
hub / github.com/Phobos-developers/Phobos / CountDigitsInNumber

Method CountDigitsInNumber

src/Utilities/GeneralUtils.cpp:190–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190int GeneralUtils::CountDigitsInNumber(int number)
191{
192 int digits = 0;
193
194 while (number)
195 {
196 number /= 10;
197 digits++;
198 }
199
200 return digits;
201}
202
203// Calculates a new coordinates based on current & target coordinates within specified distance (can be negative to switch the direction) in leptons.
204CoordStruct GeneralUtils::CalculateCoordsFromDistance(CoordStruct currentCoords, CoordStruct targetCoords, int distance)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected