Skip to content

Commit

Permalink
anim8: Print float framecounts using %f
Browse files Browse the repository at this point in the history
Ensure the print shows that the input value was a float. With %d it
prints as an integer which looks correct.
  • Loading branch information
idbrii committed Mar 9, 2021
1 parent c1c12ec commit c8c9b98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion anim8.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ local _frames = {}
local function assertPositiveInteger(value, name)
if type(value) ~= 'number' then error(("%s should be a number, was %q"):format(name, tostring(value))) end
if value < 1 then error(("%s should be a positive number, was %d"):format(name, value)) end
if value ~= math.floor(value) then error(("%s should be an integer, was %d"):format(name, value)) end
if value ~= math.floor(value) then error(("%s should be an integer, was %f"):format(name, value)) end
end

local function createFrame(self, x, y)
Expand Down

0 comments on commit c8c9b98

Please sign in to comment.