diff --git a/LibAutomaton/CellElement.c b/LibAutomaton/CellElement.c index e0fbfa1..7aa444a 100644 --- a/LibAutomaton/CellElement.c +++ b/LibAutomaton/CellElement.c @@ -137,3 +137,19 @@ void FreeCellElement(cellElement* element) { element = NULL; } + +bool OR(bool a, bool b){ + if (a || b){ + return true; + } else { + return false; + } +} + +bool AND(bool a, bool b){ + if (a && b){ + return true; + } else { + return false; + } +} diff --git a/LibAutomaton/CellElement.h b/LibAutomaton/CellElement.h index 01c44f7..982fa1d 100644 --- a/LibAutomaton/CellElement.h +++ b/LibAutomaton/CellElement.h @@ -144,4 +144,21 @@ int SetNextRow(cellElement* tree,cellElement* elem); void recursivePrint(cellElement * tree); + +/** +* Apply OR operator to a bool a and a bool b +* @param a a bool +* @param b a bool +* @return result a or b +*/ +bool OR(bool a, bool b); + +/** +* Apply AND operator to a bool a and a bool b +* @param a a bool +* @param b a bool +* @return result a and b +*/ +bool AND(bool a, bool b); + #endif diff --git a/LibAutomaton/matrix.c b/LibAutomaton/matrix.c index 88d6e42..dad465a 100644 --- a/LibAutomaton/matrix.c +++ b/LibAutomaton/matrix.c @@ -311,7 +311,6 @@ Matrix freeMatrix(Matrix matrix){ } - /* todos : *finir le freeMatrix *chasser les bugs