MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / floatUnerr

Function floatUnerr

eos/utils/float.py:19–26  ·  view source on GitHub ↗

Round possible float number error, killing some precision in process.

(value)

Source from the content-addressed store, hash-verified

17
18
19def floatUnerr(value):
20 """Round possible float number error, killing some precision in process."""
21 if value in (0, math.inf):
22 return value
23 # Find round factor, taking into consideration that we want to keep at least
24 # predefined amount of significant digits
25 roundFactor = int(keepDigits - math.ceil(math.log10(abs(value))))
26 return round(value, roundFactor)

Callers 15

renderMutantAttrsFunction · 0.90
_calcPlotPointsMethod · 0.90
_prepareDpsVolleyDataMethod · 0.90
_getDataPointMethod · 0.90
getApplicationPerKeyFunction · 0.90
getTackledSpeedFunction · 0.90
getSigRadiusMultFunction · 0.90
getApplicationPerKeyFunction · 0.90
prepareRpsDataMethod · 0.90
_getDataPointMethod · 0.90
OnWheelMethod · 0.90
valToStrFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected