orioledev/otus-body-mass-index-calculator 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

orioledev/otus-body-mass-index-calculator

最新稳定版本:1.0.2

Composer 安装命令:

composer require orioledev/otus-body-mass-index-calculator

包简介

Body mass index calculator

README 文档

README

Calculation of body mass index based on a person's given weight and height.

Installation

The package could be installed with Composer:

composer require orioledev/otus-body-mass-index-calculator

Usage

<?php

use OrioleDev\OtusBodyMassIndexCalculator\Calculator;

$weight = 60.5; // Weight in kilograms
$height = 170;  // Height in centimeters

$calc = new Calculator();

try {
    echo 'Ваш индекс массы тела: ' . $calc->calculate($weight, $height) . PHP_EOL;   // 20.9
    echo 'Комментарий: ' . $calc->getInfo($weight, $height) . PHP_EOL;               // Здоровый вес
} catch (RuntimeException $e) {
    echo 'Ошибка: ' . $e->getMessage();
}

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2025-02-14