Skip to content

Commit

Permalink
Per #3095, reorder for efficiency.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnHalleyGotway authored Mar 9, 2025
1 parent 5e08fcc commit 463cfeb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/basic/vx_math/is_bad_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ inline int is_bad_data(char a) {
}

inline int is_eq(double a, double b, double tol) {
if((is_bad_data(a) && is_bad_data(b)) ||
fabs(a - b) < tol) return 1;
else return 0;
if(fabs(a - b) < tol ||
(is_bad_data(a) &&
is_bad_data(b))) return 1;
else return 0;
}

inline int is_eq(double a, double b) {
Expand Down

0 comments on commit 463cfeb

Please sign in to comment.