git repos / blockattack-game

commit 50c81b4b

sago007 · 2020-09-19 15:21
50c81b4b4699fbe0325116a066be2570aca345e1 patch · browse files
parent d3dae16b4ac3cc30b76124bf2e37c753efac5b1d

Add M_PI for toolchains not providing it.

Changed files

M source/code/sago/SagoSprite.cpp before
diff --git a/source/code/sago/SagoSprite.cpp b/source/code/sago/SagoSprite.cpp index 7b6297e..c116e3e 100644 --- a/source/code/sago/SagoSprite.cpp +++ b/source/code/sago/SagoSprite.cpp
@@ -25,6 +25,11 @@ SOFTWARE.
#include "SagoSprite.hpp"
#include <iostream>
+#ifndef M_PI
+// M_PI is a custom extension that most C++ toolchains provide. Out Windows compiler does not provide it.
+# define M_PI 3.14159265358979323846
+#endif
+
namespace sago {
struct SagoSprite::SagoSpriteData {
@@ -168,4 +173,4 @@ int SagoSprite::GetHeight() const {
return data->imgCord.h;
}
-} //namespace sago
\ No newline at end of file
+} //namespace sago