public static function create($value, $units)
    {
        // Explode units...
        list($distUnit, $timeUnit) = static::explUnits($units);

        // Create distance and time placeholders.
        $dist = Distance::m(0);
        $time = Time::sec(0);

        // Set each distance/time unit.
        $dist->{$distUnit} = $value;
        $time->{$timeUnit} = 1;

        // Create the velocity and set the format.
        $velocity         = new Velocity($dist, $time);
        $velocity->format = static::FORMAT_DEFAULT . $units;

        return $velocity;
    }
public static function create($value, $units)
    {
        // Explode units...
        list($distUnit, $timeUnit) = static::explUnits($units);

        // Create distance and time placeholders.
        $dist = Distance::m(0);
        $time = Time::sec(0);

        // Set each distance/time unit.
        $dist->{$distUnit} = $value;
        $time->{$timeUnit} = 1;

        // Create the velocity and set the format.
        $velocity         = new Velocity($dist, $time);
        $velocity->format = static::FORMAT_DEFAULT . $units;

        return $velocity;
    }
public static function create ( $ value , $ units ) { // Explode units... list ( $ distUnit , $ timeUnit ) = static :: explUnits ( $ units ) ; // Create distance and time placeholders. $ dist = Distance :: m ( 0 ) ; $ time = Time :: sec ( 0 ) ; // Set each distance/time unit. $ dist -> { $ distUnit } = $ value ; $ time -> { $ timeUnit } = 1 ; // Create the velocity and set the format. $ velocity = new Velocity ( $ dist , $ time ) ; $ velocity -> format = static :: FORMAT_DEFAULT . $ units ; return $ velocity ; }
Creates a new velocity from a value and velocity unit.

@param $value Value of the velocity
@param $units Unit of measurement, e.g. m/s

@return static
Creates a new velocity from a value and velocity unit .