define M_PI in tpt-math.h

This commit is contained in:
jacob1 2018-04-05 23:31:28 -04:00
parent 34e73e4d7d
commit 11b2f58db7
5 changed files with 13 additions and 6 deletions

View File

@ -97,9 +97,6 @@
//Number of unique thumbnails to have in cache at one time
#define THUMB_CACHE_SIZE 256
#ifndef M_PI
#define M_PI 3.14159265f
#endif
#ifndef M_GRAV
#define M_GRAV 6.67300e-1
#endif

View File

@ -1,6 +1,13 @@
#ifndef TPT_MATH_
#define TPT_MATH_
#ifndef M_PI
#define M_PI 3.14159265f
#endif
#ifndef M_PI_2
#define M_PI_2 1.57079633f
#endif
namespace tpt
{
float sin(float angle);

View File

@ -7,6 +7,7 @@
#include "Misc.h"
#include "Renderer.h"
#include "Graphics.h"
#include "common/tpt-math.h"
#include "common/tpt-minmax.h"
#include "gui/game/RenderPreset.h"
#include "simulation/Elements.h"

View File

@ -3,11 +3,12 @@
// This header should be included by all files in src/elements/
#include <cmath>
#include "Simulation.h"
#include "graphics/Renderer.h"
#include "ElementGraphics.h"
#include "Gravity.h"
#include "Misc.h"
#include "ElementGraphics.h"
#include "Simulation.h"
#include "common/tpt-math.h"
#include "graphics/Renderer.h"
#define IPL -257.0f
#define IPH 257.0f

View File

@ -19,6 +19,7 @@
#include "ToolClasses.h"
#include "client/GameSave.h"
#include "common/tpt-compat.h"
#include "common/tpt-math.h"
#include "common/tpt-minmax.h"
#include "gui/game/Brush.h"