Permalink
Browse files

define M_PI in tpt-math.h

  • Loading branch information...
jacob1 committed Apr 6, 2018
1 parent 34e73e4 commit 11b2f58db7115686cfb825aef63c0e5462c4ee5a
Showing with 13 additions and 6 deletions.
  1. +0 −3 src/Config.h
  2. +7 −0 src/common/tpt-math.h
  3. +1 −0 src/graphics/Renderer.cpp
  4. +4 −3 src/simulation/Element.h
  5. +1 −0 src/simulation/Simulation.cpp
@@ -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
@@ -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);
@@ -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"
@@ -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
@@ -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"

0 comments on commit 11b2f58

Please sign in to comment.