Skip to content

Commit

Permalink
Do not use 'math.round'
Browse files Browse the repository at this point in the history
  • Loading branch information
Garanas committed Jan 20, 2024
1 parent a6ee015 commit 17d3707
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/blueprint/unit.spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ luft.describe(
luft.test(
"Rate of fire",
function()
local actualRateOfFire = math.round(10 / rateOfFire) * 10
local actualRateOfFire = math.floor(10 / rateOfFire + 0.5) * 10

luft.expect(rateOfFire)["to.not"].equal(0)
luft.expect(rateOfFire).to.be.equal.close(actualRateOfFire)
Expand Down

0 comments on commit 17d3707

Please sign in to comment.