AudioAsset
Ease
FastString
FontAsset
NineSlice
PackedSprite
PackedSpriteID
RB
   HardwareSettings
   IRetroBlitGame
RBAsset
Rect2i
ShaderAsset
SoundReference
SpriteGrid
SpriteSheetAsset
TMXMapAsset
   TMXLayer
   TMXLayerLoadState
   TMXObject
   TMXObjectGroup
   TMXProperties
Vector2i

FastString.PRECISION_UNDEFINED

Variable  -  Const

Type

const int

Description

Default float precision specifier. FastString.PRECISION_UNDEFINED is the default precision specifier for floating values. This precision specifier will trim leading 0s from the decimal places.

Example

const double PI = 3.1415927;

// Allocate a FastString that can hold up to 256 characters
FastString fstr = new FastString(256);

void Render() {
    // This will print "3.1415927"
    fstr.Set(PI, FastString.PRECISION_UNDEFINED);
    RB.Print(new Vector2i(00), Color.white, fstr);

    // This will print "3.14"
    fstr.Set(PI, 2);
    RB.Print(new Vector2i(020), Color.white, fstr);
}

See Also

FastString.Append
FastString.Clear

See Docs

Features - Avoid GC with Fast String