vox.utils.numfmt

Members

Functions

calcScale10
int calcScale10(Num val)

Returns number in range of [-30; 30]

calcScale2
int calcScale2(Num val)

Returns number in range of [0; 100]

numDigitsInNumber10
int numDigitsInNumber10(Num val)
Undocumented in source. Be warned that the author may not have intended to support it.
scaleToScaleIndex10
int scaleToScaleIndex10(int scale)
Undocumented in source. Be warned that the author may not have intended to support it.
scaleToScaleIndex2
int scaleToScaleIndex2(int scale)
Undocumented in source. Be warned that the author may not have intended to support it.
scaled10
double scaled10(Num num, int scale)
Undocumented in source. Be warned that the author may not have intended to support it.
scaled2
double scaled2(Num num, int scale)
Undocumented in source. Be warned that the author may not have intended to support it.
scaledNumberFmt
auto scaledNumberFmt(T value)
Undocumented in source. Be warned that the author may not have intended to support it.
scaledNumberFmt
auto scaledNumberFmt(Duration value, double scale)
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

MAX_SCALE_PREFIX
enum MAX_SCALE_PREFIX;
Undocumented in source.
MIN_SCALE_PREFIX
enum MIN_SCALE_PREFIX;
Undocumented in source.
NUM_SCALE_PREFIXES
enum NUM_SCALE_PREFIXES;
Undocumented in source.

Structs

ScaledNumberFmt
struct ScaledNumberFmt(T)

Use 'i' format char to get binary prefixes (like Ki, instead of K), only for integers Use '#' flag to get greek letter in the output (not compatible with 'i')

Variables

scalePrefixesAscii
string[] scalePrefixesAscii;
Undocumented in source.
scalePrefixesGreek
string[] scalePrefixesGreek;
Undocumented in source.

Meta

Authors

Andrey Penechko.