TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

enum FormatFlags in Tinman.Core.Formatting

Flags used for formatting numbers (integral and floating-point).

[Flags]
enum FormatFlags  

Items

Default = 0

The default format number flags.

See also:

FormatFlags.Digits1
FormatFlags.Precision15
FormatFlags.NumberBaseDecimal
Digits = 0x3F

Specifies the digit count to use for integer values.

Remarks:

When no Exponent is given, the count gives the minimum number of digits to use for formatting. Small values are padded with zeros to the left.

See also:

Format.Digits
Digits1 = 0

Specifies the minimum number of digits (1) to use when formatting integer values.

Remarks:

This flag is set by default.

See also:

Format.Digits
Digits2 = 0x01

Specifies the minimum number of digits (2) to use when formatting integer values.

See also:

Format.Digits
Digits3 = 0x02

Specifies the minimum number of digits (3) to use when formatting integer values.

See also:

Format.Digits
Digits4 = 0x03

Specifies the minimum number of digits (4) to use when formatting integer values.

See also:

Format.Digits
Digits5 = 0x04

Specifies the minimum number of digits (5) to use when formatting integer values.

See also:

Format.Digits
Digits6 = 0x05

Specifies the minimum number of digits (6) to use when formatting integer values.

See also:

Format.Digits
Digits7 = 0x06

Specifies the minimum number of digits (7) to use when formatting integer values.

See also:

Format.Digits
Digits8 = 0x07

Specifies the minimum number of digits (8) to use when formatting integer values.

See also:

Format.Digits
Digits9 = 0x08

Specifies the minimum number of digits (9) to use when formatting integer values.

See also:

Format.Digits
Digits10 = 0x09

Specifies the minimum number of digits (10) to use when formatting integer values.

See also:

Format.Digits
Digits11 = 0x0A

Specifies the minimum number of digits (11) to use when formatting integer values.

See also:

Format.Digits
Digits12 = 0x0B

Specifies the minimum number of digits (12) to use when formatting integer values.

See also:

Format.Digits
Digits13 = 0x0C

Specifies the minimum number of digits (13) to use when formatting integer values.

See also:

Format.Digits
Digits14 = 0x0D

Specifies the minimum number of digits (14) to use when formatting integer values.

See also:

Format.Digits
Digits15 = 0x0E

Specifies the minimum number of digits (15) to use when formatting integer values.

See also:

Format.Digits
Digits16 = 0x0F

Specifies the minimum number of digits (16) to use when formatting integer values.

See also:

Format.Digits
Digits17 = 0x10

Specifies the minimum number of digits (17) to use when formatting integer values.

See also:

Format.Digits
Digits18 = 0x11

Specifies the minimum number of digits (18) to use when formatting integer values.

See also:

Format.Digits
Digits19 = 0x12

Specifies the minimum number of digits (19) to use when formatting integer values.

See also:

Format.Digits
Digits20 = 0x13

Specifies the minimum number of digits (20) to use when formatting integer values.

See also:

Format.Digits
Precision = 0xC0

Bitmask for filtering the floating-point number precision flags.

See also:

FormatFlags.Precision15
FormatFlags.Precision7
FormatFlags.Precision17
FormatFlags.Precision9
Precision7 = 0x40

Floating-point numbers are output using 7 significant decimal digits.

Remarks:

Converting a string that has been output with Precision7 to a 32-bit floating point number will yield the same string when formatted again with the same precision.

Precision9 = 0xC0

Floating-point numbers are output using 9 significant decimal digits.

Remarks:

Formatting a 32-bit floating point number with Precision9 and converting the resulting string back again will yield the same 32-bit floating point number.

Precision15 = 0

Floating-point numbers are output using 15 significant decimal digits.

Remarks:

Converting a string that has been output with Precision15 to a 64-bit floating point number will yield the same string when formatted again with the same precision.

This flag is set by default.

Precision17 = 0x80

Floating-point numbers are output using 17 significant decimal digits.

Remarks:

Formatting a 32-bit floating point number with Precision17 and converting the resulting string back again will yield the same 64-bit floating point number.

NubmerBase = 0x0100

Bitmask for filtering the number base flags.

See also:

FormatFlags.NumberBaseDecimal
FormatFlags.NumberBaseHexadecimal
NumberBaseDecimal = 0

Format integer numbers with the decimal number base.

Remarks:

This flag is set by default.

NumberBaseHexadecimal = 0x0100

Format integer numbers with the hexadecimal number base.

Remarks:

The Exponent flags will be ignored when this flag is set.

Exponent = 0x01FFFE00

Specifies the decimal exponent to use for formatting integer values.

Remarks:

Formatting an integer 123456 with exponent flags has the following result:

Exponent =   5 : '1.23456E+5'
         =   4 : '1.23456E+4'
         =   3 : '123456000'
         =   2 : '12345600'
         =   1 : '1234560'
         =   0 : '123456'
         =  -1 : '12345.6'
         =  -2 : '1234.56'
         =  -3 : '123.456'
         =  -4 : '12.3456'
         =  -5 : '1.23456'
         =  -6 : '0.123456'
         =  -7 : '0.0123456'
         =  -8 : '1.23456E-3'
         =  -9 : '1.23456E-4'
The non-exponent syntax will be chosen if it is shorter than the exponent syntax. This behaviour can be overridden by specifying a Digits flag: Then the exponent syntax is only considered if the number of output digits is equal to or greater than the given digit count.

See also:

Format.Exponent