# Haste Mass Units
Various classes to handle weighable objects and convert between different mass units. You can either use the Weight object or implement one of the available interfaces.
## Supported mass units ##
The `Unit` class can measure and convert between several mass units.
Unit | Short name | Constant |
Miligram | mg | Unit::MILIGRAM |
Gram | g | Unit::GRAM |
Kilogram | kg | Unit::KILOGRAM |
Metric ton | t | Unit::METRICTON |
Carat | c | Unit::CARAT |
Ounce | oz | Unit::OUNCE |
Pund | lb | Unit::POUND |
Stone | st | Unit::STONE |
Grain | grain | Unit::GRAIN |
## Examples ##
### Convert a weight ###
```php
Returns `2.20459`
### Measure weight of multiple object ###
```php
add(new \Haste\Units\Mass\Weight(1, \Haste\Units\Mass\Unit::KILOGRAM));
// Add 500 gram
$objScale->add(new \Haste\Units\Mass\Weight(5000, \Haste\Units\Mass\Unit::MILIGRAM));
echo $objScale->amountIn(\Haste\Units\Mass\Unit::GRAM);
```
> Returns `1005`
Add some more to the scale:
```php
add(new \Haste\Units\Mass\Weight(3, \Haste\Units\Mass\Unit::STONE));
echo $objScale->amountIn(\Haste\Units\Mass\Unit::POUND);
```
> Returns `2257.60776`