Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It looks like maxPrecision is designed to avoid things like "0.0000000001 qm" for very small values and turn that into "0.000 qm" instead. What using values like "-1" did is just kind of butcher the formatting for values smaller than 1.0 and lose the significant digits. There's an optimal value for a given number of sigfigs to set maxPrecision to in order to get a fixed-width number of characters of precision that doesn't overflow with very, very tiny values. That is now the default, and it adapts by default to the setting of SigFigs.. The arguments have also been swapped so that sigFigs is first and that's the one that should probably be used. When it comes to existing uses, stuff like ToSI(-1) has been converted to the default. When it comes to ToSI(3) that probably was intended to mean 3 sigFigs but never did that so most of that is just set to the default as well. Stuff that was ToSI(-1, 3) has been converted to ToSI(3) since that was correctly setting 3 sigFigs. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
- Loading branch information
1 parent
a380a1f
commit 02fab0d
Showing
13 changed files
with
167 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.