We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In both Number::getSuffixNotation() and MagnitudeSuffix::__toString(), the nearest SI magnitude is computed using:
Number::getSuffixNotation()
MagnitudeSuffix::__toString()
3 * floor($magnitude/3)
It would be convenient if either Number or MagnitudeSuffix could provide such information.
Number
MagnitudeSuffix
In my case I am using PHP's round() with negative precision parameter to round a given number to k, M, G, etc. without any decimal part:
round()
precision
$suffixed = Number::n( round( $input_number, -1 * (3 * floor(Number::n($input_number)->getMagnitude()/3)) ) ) ->getSuffixNotation();
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In both
Number::getSuffixNotation()
andMagnitudeSuffix::__toString()
, the nearest SI magnitude is computed using:It would be convenient if either
Number
orMagnitudeSuffix
could provide such information.In my case I am using PHP's
round()
with negativeprecision
parameter to round a given number to k, M, G, etc. without any decimal part:The text was updated successfully, but these errors were encountered: