reusables / distance
The Distance Object
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 3
pkg:composer/reusables/distance
Requires
- php: >=5.3
Requires (Dev)
- phpunit/phpunit: ~4.5
- satooshi/php-coveralls: 0.6.*
This package is not auto-updated.
Last update: 2025-10-25 21:54:00 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.