diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index d99a933..20b7c33 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -34,6 +34,10 @@ double cosineFunction(double angle) { return cos(angle * M_PI / 180.0); } +double tangentFunction(double angle) { + // Convert degrees to radians for trigonometric functions + return tan(angle * M_PI / 180.0); +} // scientificmode diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index a5b9d40..a2b16d0 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -13,6 +13,8 @@ double sineFunction(double angle); double cosineFunction(double angle); +double tangentFunction(double angle); + int mode(int userChoice); int displayMenu();