common: fix compatibility issue for MSVC

Math Constants are not defined in Standard C/C++

for this, we can use _USE_MATH_DEFINES before math headers.
This commit is contained in:
Hermet Park 2021-06-23 13:31:13 +09:00 committed by Hermet Park
parent 89d35123d8
commit 87b94b7a7f
3 changed files with 9 additions and 0 deletions

View file

@ -19,6 +19,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#define _USE_MATH_DEFINES //Math Constants are not defined in Standard C/C++.
#include <limits>
#include <float.h>
#include <math.h>

View file

@ -19,6 +19,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#define _USE_MATH_DEFINES //Math Constants are not defined in Standard C/C++.
#include <fstream>
#include <float.h>
#include <math.h>

View file

@ -19,6 +19,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#define _USE_MATH_DEFINES //Math Constants are not defined in Standard C/C++.
#include <math.h>
#include <clocale>
#include <ctype.h>