diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index 60e57f1..f407180 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -22,6 +22,12 @@ int divide(int a, int b) { return a / b; } +// Trigonometric functions +double sineFunction(double angle) { + // Convert degrees to radians for trigonometric functions + return sin(angle * M_PI / 180.0); +} + // scientificmode diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index 5bbfe6b..1ca10c6 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -9,6 +9,8 @@ int multiply(int a, int b); int divide(int a, int b); +double sineFunction(double angle); + int mode(int userChoice); int displayMenu();