Browse Source

Updated specification and gap at 3 trigonometric function

remotes/origin/develop
Leon Wolf 11 months ago
parent
commit
20631017c9
  1. 8
      src/trigonometricFunctions.c

8
src/trigonometricFunctions.c

@ -4,21 +4,19 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
//function for trigonometric //function for trigonometric
//Function 1 double
//Function 1 for double
double* calculate_sin_double(double angle) { double* calculate_sin_double(double angle) {
double* result= malloc(sizeof (double)); double* result= malloc(sizeof (double));
*result=sin(angle); *result=sin(angle);
return result; return result;
} }
//Function 2 double
//Function 2 for double
double* calculate_cos_double(double angle) { double* calculate_cos_double(double angle) {
double* result= malloc(sizeof (double)); double* result= malloc(sizeof (double));
*result=cos(angle); *result=cos(angle);
return result; return result;
} }
//Function 3 double
//Function 3 for double
double* calculate_tan_double(double angle) { double* calculate_tan_double(double angle) {
double* result= malloc(sizeof (double)); double* result= malloc(sizeof (double));
*result=tan(angle); *result=tan(angle);

Loading…
Cancel
Save