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.

24 lines
600 B

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