diff --git a/src/reihen.c b/src/reihen.c index 4e3ebb0..b31d063 100644 --- a/src/reihen.c +++ b/src/reihen.c @@ -6,6 +6,8 @@ #include "exponent.h" #include "logarithmus.h" +#define PI pi(1e-8) + unsigned long long fac(int x){ unsigned long long prod = 1; if(x==0) return 1; @@ -30,6 +32,15 @@ double euler(){ return exponential(1); } +double squashDegreesTo360(double x){ + int multiple = x / 360; + return x - (360*multiple); +} + +double radians(double d){ + return d / PI * 180; +} + double pi(double eps){ double a = 1, b = 1/powerD(0.5, 2), t = 0.25, p = 1; double aNew, piold, pi = 1;