public static class LiteralHow a constant is spelled when a compiler has to write one.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Round-trip format and the invariant culture, both for the same reason they are used in VfxShaderEmitter: a shortest-round-trip literal reads back as the same float, and a machine whose decimal separator is a comma must not emit source no compiler will parse.
No type suffix, and no invented decimal point. Whether a float literal is written 2f, 2.0 or 2.0f is the target language's business, and this is shared by every target. Padding 2 out to 2.0 here would put a decimal point into source that a target then suffixes, and 2.0f is not what any hand-written shader in this repository looks like.
Methods (1)
public static string Of(float value)A float, as digits.
Used by (3)
- DynamicVectorVixen.Editor.NodeGraph
- ScalarVixen.Editor.NodeGraph
- ShaderGraphCompilerVixen.Editor.ShaderGraph