reusables / distance
The Distance Object
v1.0.0
2015-04-02 07:21 UTC
Requires
- php: >=5.3
Requires (Dev)
- phpunit/phpunit: ~4.5
- satooshi/php-coveralls: 0.6.*
This package is not auto-updated.
Last update: 2025-06-21 20:04:55 UTC
README
The Distance Object.
Install
composer require reusables/distance
Usage
<?php use \Reusables\Unit\Distance; // instantiate $distance = new Distance(36, Distance::INCHES); // convert $feet = $distance->to(Distance::FEET)->value(); // 3 (FEET) // add $inches = $distance->add(new Distance(1, Distance::FEET))->value(); // 48 (INCHES)
See docblocks for more details.
License
This library is available under a MIT license.