Browse Source

arcSine

remotes/origin/Khaled
Khaled 11 months ago
parent
commit
9a2f6e2161
  1. 13
      src/c/funktionen.c

13
src/c/funktionen.c

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