kfosoft/php-accept-ratio

There is no license information available for the latest version (20.11) of this package.

PHP Screen Accept Ratio Helper

20.11 2020-11-27 21:27 UTC

This package is auto-updated.

Last update: 2024-04-28 04:51:36 UTC


README

Installation

Installation with Composer

Either run

    php composer.phar require --prefer-dist kfosoft/php-accept-ratio:"*"

or add in composer.json

    "require": {
            ...
            "kfosoft/php-accept-ratio":"*"
    }

Well done!

Examples

use KFOSOFT\Domain\Display\Value\DisplayAcceptRatio;

echo DisplayAcceptRatio::create(1366, 768)(); // 16:9
echo DisplayAcceptRatio::create(1280, 1024)->calculateRatio(); // 5:4

Enjoy, guys!