Browse Source

refactoring: if angle is 0 return 0 for sin

master
fdai7968 11 months ago
parent
commit
0d884ee53c
  1. 3
      src/trig_functions/trig_functions.c

3
src/trig_functions/trig_functions.c

@ -2,7 +2,8 @@
#include <math.h> #include <math.h>
double calculate_sin(double angle) { double calculate_sin(double angle) {
return sin(angle);
if (angle==0) return 0;
else return sin(angle);
} }
double calculate_cos(double angle) { double calculate_cos(double angle) {

Loading…
Cancel
Save