From 17d3707b061e2703b39974508dafc75fde77c52c Mon Sep 17 00:00:00 2001 From: "(Jip) Willem Wijnia" Date: Sat, 20 Jan 2024 11:07:48 +0100 Subject: [PATCH] Do not use 'math.round' --- tests/blueprint/unit.spec.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/blueprint/unit.spec.lua b/tests/blueprint/unit.spec.lua index 7cfb087703..ede470eb2f 100644 --- a/tests/blueprint/unit.spec.lua +++ b/tests/blueprint/unit.spec.lua @@ -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)