Closed majin22 closed 7 years ago
bugs that are fixed while working on this task:
</span>
on the sodium div
[ daily fiber value * (calorie intake / 2000) ]
is zero (eg. there was an error in the input where the daily fiber value is set to zero), it will result to division by zero
. this possible error is caught on all other instances where if the result is zero, it is changed to 1 to prevent the "division by zero" error
when I assessed the needed changes for version 7, i found that it will probably complicate the code and make it hard to read and edit in the future
this is the attempt to prevent that problem after the version 7 codes are in place as the function was coded before without this kind of major change in plan
the major change in version 7 is to add a feature to show the new version of the label (2018 version) http://www.fda.gov/Food/GuidanceRegulation/GuidanceDocumentsRegulatoryInformation/LabelingNutrition/ucm385663.htm and the current one (legacy version)