Modules: app/util/BmiUtils

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
weight

in kilograms

height

in 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
weight
height
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
weight
heigh
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
weight
height
Source:
Returns:
Type
boolean

<static> isDangerous(weight, height)

Checks if you are able to weigh in based on your BMI

Parameters:
Name Type Description
weight
height
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
weight
height
Source:
Returns:
Type
boolean