You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
504 B

  1. #include "trigonometricFunctions.h"
  2. #include "math.h"
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. double* calculate_sin_double(double angle) {
  6. double* result= malloc(sizeof (double));
  7. *result=sin(angle);
  8. return result;
  9. }
  10. double* calculate_cos_double(double angle) {
  11. double* result= malloc(sizeof (double));
  12. *result=cos(angle);
  13. return result;
  14. }
  15. double* calculate_tan_double(double angle) {
  16. double* result= malloc(sizeof (double));
  17. *result=tan(angle);
  18. return result;
  19. }