diff options
Diffstat (limited to '2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/dcotda.c')
-rw-r--r-- | 2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/dcotda.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/dcotda.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/dcotda.c new file mode 100644 index 00000000..3cf032a1 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/dcotda.c @@ -0,0 +1,16 @@ +#include "cotd.h" +#include <math.h> +#define PI 3.14159265 + +void dcotda(double* in,int size,double* out) +{ + double val; + int i=0; + val = PI / 180.0; + for(i=0;i<size;i++) + { + out[i]=1/tan(in[i]*val); + /*printf("The cotangent of %lf degrees is %lf \n", in[i], out[i]);*/ + } +} + |