protected function setSpecificPrecisionFormat($precision)
{
if ($precision < 0) {
throw new \InvalidArgumentException('Precision must be positive');
}
if ($precision > 3) {
throw new \InvalidArgumentException('Invalid precision. Binary suffix converter can only represent values in ' . 'up to three decimal places');
}
$icuFormat = '#';
if ($precision > 0) {
$icuFormat .= str_pad('#.', 2 + $precision, '0');
}
foreach ($this->binaryPrefixes as $size => $unitPattern) {
if ($size >= 1024) {
$symbol = substr($unitPattern, strpos($unitPattern, ' '));
$this->binaryPrefixes[$size] = $icuFormat . $symbol;
}
}
}