Browse Source

Merge branch 'Reihen-anpassungen' into 'master'

add atan function

See merge request fdai7848/Linkes-Twix!16
master
fdai7848 11 months ago
parent
commit
62d8d7ee98
  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