Switched from math.h to cmath in math_utils.h. The old-school C math functions are bugged/not overloaded properly in GCC < 6.0 when compiling C++.

This commit is contained in:
jpekkila
2019-07-09 13:37:08 +03:00
parent eda2f6543b
commit 508d15b578

View File

@@ -25,7 +25,10 @@
* *
*/ */
#pragma once #pragma once
#include <math.h> // isnan, isinf #include <cmath>
using namespace std; // Potentially bad practice to declare namespace std here
// #include <math.h> // isnan, isinf // Overloads incorrect/bugged with GCC <= 6.0
// #include <tgmath.h> // Even this does not work
#include <stdlib.h> // rand #include <stdlib.h> // rand
template <class T> template <class T>