Skip to content

Commit

Permalink
isnan.h
Browse files Browse the repository at this point in the history
  • Loading branch information
cryham committed Feb 12, 2017
1 parent 4df36d6 commit be5fb07
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
7 changes: 0 additions & 7 deletions source/vdrift/cardefs.h
Expand Up @@ -40,13 +40,6 @@ enum EPerfTest {PT_StartWait, PT_Accel, PT_Brake};

const int Ncrashsounds = 12, Nwatersounds = 3;

#ifdef _WIN32
static bool isnan(float number) { return (number != number); }
static bool isnan(double number) { return (number != number); }
#else // gcc, c++11
#define isnan(f) std::isnan(f)
#endif

const static char sCfgWh[MAX_WHEELS][4] = {"FL","FR","RL","RR","RL2","RR2","RL3","RR3"}; // .car config wheel names

const int PAR_BOOST = 2, PAR_THRUST = 4; // max particles for boost and spc thrusters
1 change: 1 addition & 0 deletions source/vdrift/cardynamics_simulate.cpp
Expand Up @@ -3,6 +3,7 @@
#include "cardynamics.h"
#include "tobullet.h"
#include "../ogre/common/Def_Str.h"
#include "isnan.h"


// set the steering angle, left -1..1 right
Expand Down
2 changes: 1 addition & 1 deletion source/vdrift/cartire.cpp
@@ -1,8 +1,8 @@
#include "pch.h"
#include "cartire.h"
#include "cardefs.h"
#include <cmath>
//#include "../ogre/common/Def_Str.h"
#include "isnan.h"


void CARTIRE::FindSigmaHatAlphaHat(Dbl load, Dbl & output_sigmahat, Dbl & output_alphahat, int iterations)
Expand Down
9 changes: 9 additions & 0 deletions source/vdrift/isnan.h
@@ -0,0 +1,9 @@
#pragma once

#ifdef _WIN32
static bool isnan(float number) { return (number != number); }
static bool isnan(double number) { return (number != number); }
#else // gcc, c++11
#include <cmath>
#define isnan(f) std::isnan(f)
#endif

0 comments on commit be5fb07

Please sign in to comment.