Ensure mathutil.hpp doesn't break in the presence of min/max macros

This commit is contained in:
2018-02-12 23:36:30 -05:00
parent 709faf2c03
commit 5bc085facd

View File

@@ -6,9 +6,20 @@
* *
*/ */
#pragma once
#include <cmath> #include <cmath>
#include <SFML/System/Time.hpp> #include <SFML/System/Time.hpp>
// Make sure min and max macros are not defined.
// Some Windows headers may define these.
#ifdef min
#undef min
#endif
#ifdef max
#undef max
#endif
using std::abs; using std::abs;
short get_ran(short times, short min, short max); short get_ran(short times, short min, short max);
short max(short a,short b); short max(short a,short b);