We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 287792a commit 0617986Copy full SHA for 0617986
1 file changed
src/backend/mode_gpu.js
@@ -183,7 +183,12 @@
183
if (opt.constants) {
184
for (var name in opt.constants) {
185
var value = opt.constants[name];
186
- constantsStr += 'const float constants_' + name + '=' + parseInt(value) + '.0;\n';
+
187
+ if (Number.isInteger(value)) {
188
+ constantsStr += 'const float constants_' + name + '=' + parseInt(value) + '.0;\n';
189
+ } else {
190
+ constantsStr += 'const float constants_' + name + '=' + parseFloat(value) + ';\n';
191
+ }
192
}
193
194
0 commit comments