Skip to content

change unit_to_g() to unit_to_default_unit() ? #1665

Open

Description

$unit eq 'kcal' and return int($value * 4.184 + 0.5);
$unit eq 'kcal' and return int($value / 4.184 + 0.5);
Apparently, 1 cal = 4.184 J, but why would it make sense to calculate unit_to_g(1, 'kcal') to 4.684 g? Wouldn't this need to use 9 g for fat and 4 g for protein and carbohydrates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Type

No type

Projects

  • Status

    To discuss and validate

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions