|
@ -6,6 +6,8 @@ |
|
|
#include "exponent.h" |
|
|
#include "exponent.h" |
|
|
#include "logarithmus.h" |
|
|
#include "logarithmus.h" |
|
|
|
|
|
|
|
|
|
|
|
#define PI pi(1e-8) |
|
|
|
|
|
|
|
|
unsigned long long fac(int x){ |
|
|
unsigned long long fac(int x){ |
|
|
unsigned long long prod = 1; |
|
|
unsigned long long prod = 1; |
|
|
if(x==0) return 1; |
|
|
if(x==0) return 1; |
|
@ -30,6 +32,15 @@ double euler(){ |
|
|
return exponential(1); |
|
|
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 pi(double eps){ |
|
|
double a = 1, b = 1/powerD(0.5, 2), t = 0.25, p = 1; |
|
|
double a = 1, b = 1/powerD(0.5, 2), t = 0.25, p = 1; |
|
|
double aNew, piold, pi = 1; |
|
|
double aNew, piold, pi = 1; |
|
|