Utilities to calculate BMI from weight and height, and determining if the BMI is within configured limits
- Source:
Methods
-
<static> calculateBmi(weight, height)
-
Calculates the BMI with metric units NOTE: both units need to be metric
Parameters:
Name Type Description weightin kilograms
heightin centimeters
- Source:
Returns:
- Type
- number
-
<static> canWeighIn(weight, height)
-
Checks if you are able to weigh in based on your BMI
Parameters:
Name Type Description weightheight- Source:
Returns:
- Type
- boolean
-
<static> isAtRisk(weight, heigh)
-
Checks if you are able to set a target weigh in based on your BMI
Parameters:
Name Type Description weightheigh- Source:
Returns:
- Type
- boolean
-
<static> isBmiRangeSafe(weight, height)
-
Checks if your BMI is within the safe range as defined by the marketConfig
Parameters:
Name Type Description weightheight- Source:
Returns:
- Type
- boolean
-
<static> isDangerous(weight, height)
-
Checks if you are able to weigh in based on your BMI
Parameters:
Name Type Description weightheight- Source:
Returns:
- Type
- boolean
-
<static> isTransferBmiRangeSafe(weight, height)
-
Checks if your BMI is within the safe range to transfer as defined by the marketConfig
Parameters:
Name Type Description weightheight- Source:
Returns:
- Type
- boolean