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:
parent
3c5380dd32
commit
73c1515c81
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user