UnitConverterInterface
in
Converts quantities to different units.
Tags
Table of Contents
Methods
- convert() : QuantityInterface
- Converts the source quantity to target unit.
Methods
convert()
Converts the source quantity to target unit.
public
convert(QuantityInterface $from, UnitInterface $to) : QuantityInterface
APIYes
Parameters
- $from : QuantityInterface
-
source quantity
- $to : UnitInterface
-
target unit
Return values
QuantityInterface —converted quantity