Skip to content

Commit

Permalink
Fixed compilation with OSX 10.8 (std::isnan, Issue #23)
Browse files Browse the repository at this point in the history
  • Loading branch information
Armin Hornung committed Jun 6, 2013
1 parent 7b89ddd commit 0950c10
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion octomap/src/compare_octrees.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include <string.h>
#include <stdlib.h>
#include <list>
#include <cmath>

using std::cout;
using std::endl;
Expand Down Expand Up @@ -132,7 +133,7 @@ int main(int argc, char** argv) {
else
kld +=log(p1/p2)*p1 + log((1-p1)/(1-p2))*(1-p1);

if (isnan(kld)){
if (std::isnan(kld)){
OCTOMAP_ERROR("KLD is nan! KLD(%f,%f)=%f; sum = %f", p1, p2, kld, kld_sum);
exit(-1);
}
Expand Down

0 comments on commit 0950c10

Please sign in to comment.