ushios/shape

形状库,可计算矩形比例等。

0.0.6 2015-11-10 04:00 UTC

This package is not auto-updated.

Last update: 2024-09-28 18:00:07 UTC


README

Build Status Coverage Status Dependency Status Codacy Badge

计算您的形状。

安装

使用composer

{
    ...
    "require": {
        "ushios/shape": "0.*"
    }
}

@see Packagist

用法

<?php

use Ushios\Shape\Rectangle;
use Ushios\Shape\Calculator\Scale;

$base = new Rectangle(200, 400);
$target = new Rectangle(400, 500);

$newRect = Scale::fillRectWithRect($base, $target); // Got width:200, height:250 rectangle

开发者

测试

$ vendor/bin/phpunit

格式

$ vendor/bin/php-cs-fixer fix 

使用phpDocumenter制作API文档

$ vendor/bin/phpdoc