From ae9c0eed9d3029ea5bbbd0aa8afebc9912d9eec6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Luk=C3=A1=C5=A1=20Ji=C5=99i=C5=A1t=C4=9B?= Date: Sat, 29 Mar 2025 18:43:21 +0100 Subject: [PATCH] Set the minimum space between FETs to 2 This is much better, because before one could place a FET so that it overlaps a part of another one... --- src/schema_mode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schema_mode.c b/src/schema_mode.c index f4c9a3e..644b25c 100644 --- a/src/schema_mode.c +++ b/src/schema_mode.c @@ -110,7 +110,7 @@ void schema_add_mosfet(WINDOW *schematics_win, t_vec *nodes, t_vec *mosfets, t_p mosfet = ft_vec_access(mosfets, i); rel_pos.x = mosfet->position.x - pos.x; rel_pos.y = mosfet->position.y - pos.y; - if ((-1 <= rel_pos.x && rel_pos.x <= 1) && (-1 <= rel_pos.y && rel_pos.y <= 1)) + if ((-2 <= rel_pos.x && rel_pos.x <= 2) && (-2 <= rel_pos.y && rel_pos.y <= 2)) { // Error - mosfets cannot overlap return ; -- 2.30.2