Browse Source

refactoring: if angle is 0 return 0 for tangens

master
fdai7968 11 months ago
parent
commit
98d95b8c49
  1. 3
      src/trig_functions/trig_functions.c

3
src/trig_functions/trig_functions.c

@ -12,5 +12,6 @@ double calculate_cos(double angle) {
}
double calculate_tan(double angle) {
return tan(angle);
if (angle==0) return 0;
else return tan(angle);
}
Loading…
Cancel
Save