Skip to content

@kaiord/core


@kaiord/core / computeMacroTargets

Function: computeMacroTargets() ​

computeMacroTargets(input): object

Defined in: packages/core/src/application/energy/macro-targets.ts:56

Derive protein/carb/fat gram targets from a calorie target and bodyweight.

Parameters ​

input ​

ComputeMacroTargetsInput

Returns ​

object

carb_g ​

carb_g: number

fat_g ​

fat_g: number

kcal ​

kcal: number

protein_g ​

protein_g: number

Throws ​

RangeError when targetKcal or weightKg is not positive and finite.