Fix for isfinite.

This commit is contained in:
jgoppert
2015-11-06 21:09:34 -05:00
parent 7abbdcd88f
commit a2696fcee4
+5 -3
View File
@@ -10,6 +10,8 @@
#include "matrix.hpp" #include "matrix.hpp"
#include <cmath>
namespace matrix namespace matrix
{ {
@@ -56,13 +58,13 @@ public:
psi() = 0; psi() = 0;
theta() = 0; theta() = 0;
phi() = 0; phi() = 0;
if (isfinite(psi_val)) { if (std::isfinite(psi_val)) {
psi() = psi_val; psi() = psi_val;
} }
if (isfinite(theta_val)) { if (std::isfinite(theta_val)) {
theta() = theta_val; theta() = theta_val;
} }
if (isfinite(phi_val)) { if (std::isfinite(phi_val)) {
phi() = phi_val; phi() = phi_val;
} }
} }