Skip to content

Commit 9145f55

Browse files
committed
Make constants accept number-like strings (backward compatiblity)
1 parent 188d94b commit 9145f55

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/backend/mode_gpu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
var constantsStr = '';
184184
if (opt.constants) {
185185
for (var name in opt.constants) {
186-
var value = opt.constants[name];
186+
var value = parseFloat(opt.constants[name]);
187187

188188
if (Number.isInteger(value)) {
189189
constantsStr += 'const float constants_' + name + '=' + parseInt(value) + '.0;\n';

0 commit comments

Comments
 (0)