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:
@@ -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>
|
||||||
|
Reference in New Issue
Block a user