projects
/
FET_sim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d6aa9a3
)
Set the minimum space between FETs to 2
author
Lukáš Jiřiště
<gymnazium.jiriste@gmail.com>
Sat, 29 Mar 2025 17:43:21 +0000
(18:43 +0100)
committer
Lukáš Jiřiště
<gymnazium.jiriste@gmail.com>
Sat, 29 Mar 2025 17:43:21 +0000
(18:43 +0100)
This is much better, because before one could place a FET so that it
overlaps a part of another one...
src/schema_mode.c
patch
|
blob
|
history
diff --git
a/src/schema_mode.c
b/src/schema_mode.c
index f4c9a3ef22093ed4db5a35234a3bc1b2915ee8e1..644b25ce4747d7b466de94893f77598e5f4c1d7a 100644
(file)
--- 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 ;