pynxxas.io.utils.gformat#
- pynxxas.io.utils.gformat(val, length=11)[source]#
Format a number with ‘%g’-like format.
- Except that:
the length of the output string will be of the requested length.
b) positive numbers will have a leading blank. b) the precision will be as high as possible. c) trailing zeros will not be trimmed.
The precision will typically be
length-7.Parameters#
- valfloat
Value to be formatted.
- lengthint, optional
Length of output string (default is 11).
Returns#
- str
String of specified length.
Notes#
Positive values will have leading blank.