Skip to content

Commit

Permalink
add std:: namespace to isnan (fixes #8)
Browse files Browse the repository at this point in the history
  • Loading branch information
diemoschwarz authored May 27, 2019
1 parent 6b9455b commit 7dc1297
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/distributions/xmmGaussianDistribution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ xmm::Ellipse xmm::GaussianDistribution::toEllipse(unsigned int dimension1,
gaussian_ellipse.width = sqrt(5.991 * eigenVal1);
gaussian_ellipse.height = sqrt(5.991 * eigenVal2);
gaussian_ellipse.angle = atan(b / (eigenVal1 - c));
if (isnan(gaussian_ellipse.angle)) {
if (std::isnan(gaussian_ellipse.angle)) {
gaussian_ellipse.angle = M_PI_2;
}

Expand Down Expand Up @@ -695,7 +695,7 @@ xmm::Ellipse xmm::covariance2ellipse(double c_xx, double c_xy, double c_yy) {
gaussian_ellipse.width = sqrt(5.991 * eigenVal1);
gaussian_ellipse.height = sqrt(5.991 * eigenVal2);
gaussian_ellipse.angle = atan(c_xy / (eigenVal1 - c_yy));
if (isnan(gaussian_ellipse.angle)) {
if (std::isnan(gaussian_ellipse.angle)) {
gaussian_ellipse.angle = M_PI_2;
}

Expand Down

0 comments on commit 7dc1297

Please sign in to comment.