Browse Source

Commit trigonometric Functions

remotes/origin/develop
Leon Wolf 11 months ago
parent
commit
2b1a599aee
  1. 25
      src/trigonometricFunctions.c
  2. 9
      src/trigonometricFunctions.h

25
src/trigonometricFunctions.c

@ -0,0 +1,25 @@
#include "trigonometricFunctions.h"
#include "math.h"
#include <stdio.h>
#include <stdlib.h>
double* calculate_sin_double(double angle) {
double* result= malloc(sizeof (double));
*result=sin(angle);
return result;
}
double* calculate_cos_double(double angle) {
double* result= malloc(sizeof (double));
*result=cos(angle);
return result;
}
double* calculate_tan_double(double angle) {
double* result= malloc(sizeof (double));
*result=tan(angle);
return result;
}

9
src/trigonometricFunctions.h

@ -0,0 +1,9 @@
#ifndef THEADMIRALS_TRIGONOMETRICFUNCTIONS_H
#define THEADMIRALS_TRIGONOMETRICFUNCTIONS_H
double* calculate_sin_double(double angle);
double* calculate_cos_double(double angle);
double* calculate_tan_double(double angle);
#endif //THEADMIRALS_TRIGONOMETRICFUNCTIONS_H
Loading…
Cancel
Save