ayzanet/php-math
Composer 安装命令:
composer require ayzanet/php-math
包简介
Convert PHP's math resources to objects
README 文档
README
Simple library for convert PHP math functions to objects.
Features:
- High human readable API
- Numbers manipulating
- Supported chain methods!
Installation
php >= 7.0is required$ composer require ayzanet/php-math:^1.0
Basic Usage
// Normal usage Math::abs(-56); // 56 Math::floor(-63.6); // 63 Math::pow(2,3); // 9 Math::isNan(10); // false Math::round(5.6) // 6 Math::max([5, 3, 8]) // 8 Math::min([5, 3, 8]) // 3 // Use Chain Methods (new Math(-10.6))::abs()::floor()::div(2)::get() // 5 (new Math(25))::sqrt()::pow(3)::get() // 125
Just See the code for other methods api!
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2020-11-28