sunstrike/converter
最新稳定版本:v0.3.0
Composer 安装命令:
composer require sunstrike/converter
包简介
README 文档
README
Overview
This is a library for converting any unit to another. All the units and their precission are costomizable just by updating units database. current version supports conversion for:
- Weight
- Length
Insallation
You can install this package by running following composer command:
composer require sunstrike/converter
Examples
Weight conversion:
<?php use Sunstrike/Converter/Convert; $grams = Convert::weight(10)->from('kg')->to('g'); // 10,000 grams
Length conversion:
<?php use Sunstrike/Converter/Convert; $miles = Convert::length(100)->from('km')->to('mi'); // 62.137 miles
Pressure conversion:
<?php use Sunstrike/Converter/Convert; $miles = Convert::pressure(1)->from('bar')->to('pa'); // 100000 pascals
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-09-06