Fixed handling of exp constants in shaders
このコミットが含まれているのは:
1 親
37a6e5a7b3
コミット
0cc3f08eec
1ファイル変更
+5
-1
@@ -180,7 +180,11 @@ namespace ComputeSharp.SourceGenerators.SyntaxRewriters
|
||||
{
|
||||
string literal = updatedNode.Token.ValueText;
|
||||
|
||||
if (!literal.Contains('.')) literal += ".0";
|
||||
// If the numeric literal is neither a decimal nor an exponential, add the ".0" suffix
|
||||
if (literal.IndexOfAny(new[] { '.', 'E' }) == -1)
|
||||
{
|
||||
literal += ".0";
|
||||
}
|
||||
|
||||
return updatedNode.WithToken(Literal(literal, 0f));
|
||||
}
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする