From 118d39b453846fc82eb16798a6d049bcbda440d6 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Sat, 20 Jun 2026 14:13:19 +0900 Subject: [PATCH] . --- PHI-CL/control/inserter.lua | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/PHI-CL/control/inserter.lua b/PHI-CL/control/inserter.lua index 31dcaab..d97bb4d 100644 --- a/PHI-CL/control/inserter.lua +++ b/PHI-CL/control/inserter.lua @@ -46,15 +46,7 @@ function main.calc(entity) if pickup_length > 0 and drop_length > 0 then local ratio = ((entity.pickup_position.x - entity.position.x) * (entity.drop_position.x - entity.position.x) + (entity.pickup_position.y - entity.position.y) * (entity.drop_position.y - entity.position.y)) / (pickup_length * drop_length) - - if ratio > 1 then - ratio = 1 - - elseif ratio < -1 then - ratio = -1 - end - - angle = math.acos(ratio) + angle = math.acos(math.max(-1, math.min(1, ratio))) end local ticks_per_cycle = 2 * math.ceil((angle / (math.pi * 2) - 0.001) / prototype.get_inserter_rotation_speed(entity.quality))