Added "Calculator" application for future testing #3

This commit is contained in:
Igor Timofeev 2018-12-24 09:11:37 +03:00
parent 1e1e7ff33d
commit 8acab5f12c

View File

@ -80,7 +80,12 @@ modeList.selectedItem = 2
local displayWidget = displayContainer:addChild(GUI.object(4, 1, window.width - 6, displayHeight))
local function parseFloat(v)
return tostring(v * 1.0):match("(.+)%.(.+)")
local integer, fractional = tostring(v * 1.0):match("(.+)%.(.+)")
if integer then
return integer, fractional
else
return tostring(v), "0"
end
end
local function format(v)