Fixed Mesannine twister to use UInt32

master
Tycho 2014-03-09 11:21:42 -07:00
parent b5e33c5424
commit 9825dbfd34
5 changed files with 7 additions and 5 deletions

@ -1 +1 @@
Subproject commit 013a32a7fb3c8a6cfe0aef892d4c7394d4e1be59
Subproject commit 3b416b07a339b3abcbc127070d56eea05b05373d

View File

@ -43,7 +43,7 @@ public:
size_t GetReadableSpace(void) const;
/// Returns the current data start index. For debugging purposes.
int GetDataStart(void) const { return m_DataStart; }
size_t GetDataStart(void) const { return m_DataStart; }
/// Returns true if the specified amount of bytes are available for reading
bool CanReadBytes(size_t a_Count) const;

View File

@ -469,7 +469,7 @@ inline void EulerToVector(double a_Pan, double a_Pitch, double & a_X, double & a
inline void VectorToEuler(double a_X, double a_Y, double a_Z, double & a_Pan, double & a_Pitch)
{
if (a_X != 0)
if (fabs(a_X) < std::numeric_limits::epsilon() )
{
a_Pan = atan2(a_Z, a_X) * 180 / PI - 90;
}

View File

@ -64,7 +64,7 @@ public:
unsigned int GetPixelX(void) const { return m_PixelX; }
unsigned int GetPixelZ(void) const { return m_PixelZ; }
int GetRot(void) const { return m_Rot; }
unsigned int GetRot(void) const { return m_Rot; }
eType GetType(void) const { return m_Type; }

View File

@ -59,10 +59,12 @@
#include <ctime>
#include <cmath>
#include "Globals.h"
class MTRand {
// Data
public:
typedef long uint32; // unsigned integer type, at least 32 bits
typedef UInt32 uint32; // unsigned integer type, at least 32 bits
enum { N = 624 }; // length of state vector
enum { SAVE = N + 1 }; // length of array for save()