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
532 B

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