Property | Type | Description | |
---|---|---|---|
$dimension | integer | float | ||
$precision | integer | ||
$units | array |
Property | Type | Description | |
---|---|---|---|
$unitTable | array |
Method | Description | |
---|---|---|
__construct ( mixed $dimension, mixed $initialUnit ) | Initialize number | |
__toString ( ) | ||
coerce ( array $units ) : |
Coerce number to target units | |
normalize ( ) : |
Normalize number | |
offsetExists ( $offset ) | ||
offsetGet ( $offset ) | ||
offsetSet ( $offset, $value ) | ||
offsetUnset ( $offset ) | ||
output ( |
Output number | |
unitStr ( ) : string | Returns unit(s) as the product of numerator units divided by the product of denominator units | |
unitless ( ) : boolean | Returns true if the number is unitless |
Method | Description | |
---|---|---|
normalizeUnits ( integer | float &$dimension, array &$units, string $baseUnit = 'in' ) | Normalize units |
public __construct ( mixed $dimension, mixed $initialUnit ) | ||
$dimension | mixed | |
$initialUnit | mixed |