frost/distance

A distance conversion library

1.0.1 2014-06-21 19:33 UTC

This package is auto-updated.

Last update: 2024-11-12 09:18:11 UTC


README

This distance conversion library provides the functionality to convert a provided distance from one distance unit to another. Common US and metric distance measurements are supported (mi, ft, in, km, m, cm, and mm). Convert from US to metric, metric to US, US to US or metric to metric.

Usage:

    <?php
    use Frost\Distance;

    $distance = new Distance();
    $distance->setUnit('km')
        ->setDistance(10);
        ->convertTo('mi');