Browse Source

refactoring: if angle is 0 return 1 for cosinus

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

3
src/trig_functions/trig_functions.c

@ -7,7 +7,8 @@ double calculate_sin(double angle) {
} }
double calculate_cos(double angle) { double calculate_cos(double angle) {
return cos(angle);
if (angle==0) return 1;
else return cos(angle);
} }
double calculate_tan(double angle) { double calculate_tan(double angle) {

Loading…
Cancel
Save