From 17ccd18ed3a41702ac7de7e55fca09578f734ccb Mon Sep 17 00:00:00 2001 From: D G Turner Date: Fri, 2 Aug 2013 06:23:52 +0100 Subject: [PATCH] COMMON: Add comment explaining reason for defining math constants. --- common/scummsys.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/scummsys.h b/common/scummsys.h index aeffbbfcf37..099b12b2917 100644 --- a/common/scummsys.h +++ b/common/scummsys.h @@ -144,6 +144,11 @@ #endif #endif +// The following math constants are usually defined by the system math.h header, but +// they are not part of the ANSI C++ standards and so can NOT be relied upon to be +// present i.e. when -std=c++11 is passed to GCC, enabling strict ANSI compliance. +// As we rely on these being present, we define them if they are not set. + #ifndef M_SQRT1_2 #define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */ #endif