Number (class)

From PGE Wiki
Revision as of 03:49, 3 November 2016 by Pixelpest (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Number is the universal number data type in Lua. It can contain every type of number. If you want to use it a function be sure to provide the correct hardcoded data type!

Example:

local a = 5
local b = 0.5
printText(tostring(a).." + "..tostring(b).." = "..tostring(a+b), 30, 100) --calculates a+b and prints out the result.