Browse Source

arcCosine Funktion

remotes/origin/Khaled
Khaled 11 months ago
parent
commit
20c0d62f83
  1. 12
      src/c/funktionen.c

12
src/c/funktionen.c

@ -105,3 +105,15 @@ float arcSine(float x) {
return 0; return 0;
} }
} }
// Function to calculate the arc cosine of a value and return the result in radians
float arcCosine(float x) {
if (x >= -1 && x <= 1) {
return acos(x);
}
else {
printf("Error: Invalid input for arc cosine!\n");
return 0;
}
}
Loading…
Cancel
Save