Zero bad fields

kivy_mainline_and_py3.8
Tyler Goodlet 2018-05-08 15:47:48 -04:00
parent 995851360d
commit 3a40c2f8fe
1 changed files with 2 additions and 0 deletions

View File

@ -27,4 +27,6 @@ def percent_change(init, new):
"""Calcuate the percentage change of some ``new`` value """Calcuate the percentage change of some ``new`` value
from some initial value, ``init``. from some initial value, ``init``.
""" """
if not (init and new):
return 0
return (new - init) / init * 100. return (new - init) / init * 100.