kyimyohan/body-mass-index

output: healthy|underweight|overweight|obese input: weight&height

1.0.0 2024-02-18 15:58 UTC

This package is auto-updated.

Last update: 2024-09-19 02:44:00 UTC


README

Body Mass Index is a PHP library that accept height and weight as input and output may be healthy, underweight, overweight, obese.

Height : 5' 2" => 5.2
Weight : 105 lb

Installation

Use the composer to install.

composer require kyimyohan/body-mass-index

Usage

use Kyimyohan\BodyMassIndex\BodyMassIndex;

# returns 'healthy'
$height = 5.2;
$weight = 105
$bmi = BodyMassIndex::calculate($height, $weight)->getResult();
echo $bmi;

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT