Browse Source

Added tangent function for trigonometric calculations

remotes/origin/feature
fdai7782 11 months ago
parent
commit
51fe20da4f
  1. 4
      src/main/c/main_taschenrechner.c
  2. 2
      src/main/c/taschenrechner.h

4
src/main/c/main_taschenrechner.c

@ -34,6 +34,10 @@ double cosineFunction(double angle) {
return cos(angle * M_PI / 180.0); 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 // scientificmode

2
src/main/c/taschenrechner.h

@ -13,6 +13,8 @@ double sineFunction(double angle);
double cosineFunction(double angle); double cosineFunction(double angle);
double tangentFunction(double angle);
int mode(int userChoice); int mode(int userChoice);
int displayMenu(); int displayMenu();

Loading…
Cancel
Save