Browse Source

add atan function

master
fdai7848 11 months ago
parent
commit
1d27d75c18
  1. 14
      src/reihen.c

14
src/reihen.c

@ -80,4 +80,18 @@ double tanD(double degrees){
}
return sinD(degrees)/cosD(degrees);
}
double atanD(double degrees){
if (degrees>=360.0){
degrees = squashDegreesTo360(degrees);
}
double sum = 0.0;
double radian = radians(degrees);
for (int i = 0; i <= 9; i++){
sum += powerD((double) i, -1.0) * (powerD(2.0*i+1, radian) / 2.0*i+1);
}
return sum;
}
Loading…
Cancel
Save