承接 amitxd/libcalculator 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

amitxd/libcalculator

最新稳定版本:1.0.0

Composer 安装命令:

composer require amitxd/libcalculator

包简介

A PHP calculator library with additional mathematical functions.

README 文档

README

libCalculator is a simple PHP library for performing various mathematical calculations. It provides functions for basic arithmetic operations, as well as additional mathematical functions.

Features

  • Addition
  • Subtraction
  • Multiplication
  • Division (with error handling for division by zero)
  • Percentage calculation
  • Exponentiation
  • Square root
  • Sine, cosine, and tangent calculations

Installation

You can install this library via Composer:

composer require amitminer/libcalculator

Usage

use AmitxD\libCalculator\libCalculator;

$result1 = libCalculator::add(10, 10);
$result2 = libCalculator::subtract(10, 10);
$result3 = libCalculator::multiply(5, 10);
$result4 = libCalculator::divide(10, 5);
$result5 = libCalculator::percentage(25, 50);
$result6 = libCalculator::exponentiation(2, 3);
$result7 = libCalculator::squareRoot(25);
$result8 = libCalculator::sine(deg2rad(30));
$result9 = libCalculator::cosine(deg2rad(45));
$result10 = libCalculator::tangent(deg2rad(60));

echo "Addition: $result1\n";
echo "Subtraction: $result2\n";
echo "Multiplication: $result3\n";
echo "Division: $result4\n";
echo "Percentage: $result5\n";
echo "Exponentiation: $result6\n";
echo "Square Root: $result7\n";
echo "Sine: $result8\n";
echo "Cosine: $result9\n";
echo "Tangent: $result10\n";

Documentation

Detailed documentation for each function and class is available in the Wiki.

License

This library is open-source and licensed under the MIT License.

Contributions

Contributions and bug reports are welcome! Please feel free to open issues or pull requests on the GitHub repository.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-09-11