Skip to content

Commit

Permalink
Use fabs() for floating-point values
Browse files Browse the repository at this point in the history
  • Loading branch information
tgoyne committed Sep 13, 2015
1 parent 203b5f3 commit ff537d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/videoutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void CorrectRationalFramerate(int *Num, int *Den) {
*Num = fpsList[i];
*Den = 1;
break;
} else if ((fpsList[i] % 25) && (abs(fps - static_cast<double>(fpsList[i]) / 1.001) < delta)) {
} else if ((fpsList[i] % 25) && (fabs(fps - static_cast<double>(fpsList[i]) / 1.001) < delta)) {
*Num = fpsList[i] * 1000;
*Den = 1001;
break;
Expand Down

0 comments on commit ff537d3

Please sign in to comment.