Skip to content

Commit

Permalink
CHANGED #include <math.h> to <cmath>
Browse files Browse the repository at this point in the history
  • Loading branch information
ksterker committed Mar 21, 2010
1 parent e2a666a commit 8278598
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/world/character.cc
Expand Up @@ -28,7 +28,7 @@

#include <iostream>

#include <math.h>
#include <cmath>

#include "base/diskio.h"
#include "rpg/character.h"
Expand Down Expand Up @@ -208,12 +208,12 @@ void character::update_velocity (const s_int32 & ndir)
<< "vy: " << vy
<< std::endl;

if (vx && vy && ! isnan(vx) && ! isnan(vy))
if (vx && vy && ! std::isnan(vx) && ! std::isnan(vy))
{
float s = 1/sqrt (vx*vx + vy*vy);

vx = (vx * fabs (vx)) * s;
vy = (vy * fabs (vy)) * s;
vx = (vx * std::fabs (vx)) * s;
vy = (vy * std::fabs (vy)) * s;

std::cerr
<< std::string(LogOffset, ' ')
Expand Down

0 comments on commit 8278598

Please sign in to comment.