diff options
author | Soumith Chintala <soumith@gmail.com> | 2014-12-26 20:53:40 +0300 |
---|---|---|
committer | Soumith Chintala <soumith@gmail.com> | 2014-12-26 20:53:40 +0300 |
commit | 2ea835522b2a57c81729bd95d4cfc4c5f63be3d9 (patch) | |
tree | 0637e560a9ac42131b8c6db66838c0199e9d6745 | |
parent | 4260126f3b6eaacf6bf0c25e73fb3255a93e0517 (diff) | |
parent | 3868cc514336780a0c0e1470fde7fbd7e147bd9a (diff) |
Merge pull request #2 from GeorgOstrovski/master
Fix argument declaration for floating point numbers
-rw-r--r-- | types.lua | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -84,7 +84,7 @@ for _,typename in ipairs({"real", "unsigned char", "char", "short", "int", "long declare = function(arg) -- if it is a number we initialize here local default = tonumber(interpretdefaultvalue(arg)) or 0 - return string.format("%s arg%d = %d;", typename, arg.i, tonumber(default)) + return string.format("%s arg%d = %g;", typename, arg.i, default) end, check = function(arg, idx) |