Method | Description | |
---|---|---|
convertToSI ( double $number, integer $precision = 2, string $unit = 'B', integer $factor = 1024 ) : string | Converts 1024 to 1K, etc. | |
relativePerc ( $min, $value ) | ||
round ( $number, $significant ) |
public static convertToSI ( double $number, integer $precision = 2, string $unit = 'B', integer $factor = 1024 ) : string | ||
$number | double | i.e.: 1280 |
$precision | integer | i.e.: 1.25 for precision = 2 |
$unit | string | suffix of the unit, may be empty |
$factor | integer | change base to 1000 or 1024 |
return | string | i.e.: 1.25 kB |