1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-12 10:04:40 +02:00

change divide to multiply

This commit is contained in:
grilledham 2019-06-22 22:53:58 +01:00
parent 3c5380dd32
commit 73c1515c81

View File

@ -36,7 +36,7 @@ local function heapify_from_end_to_start(self)
local comparator = self._comparator
local pos = #self
while pos > 1 do
local parent = floor(pos / 2)
local parent = floor(pos * 0.5)
local a, b = self[pos], self[parent]
if comparator(a, b) then
self[pos], self[parent] = b, a