COMMON: Add comment explaining reason for defining math constants.

This commit is contained in:
D G Turner 2013-08-02 06:23:52 +01:00
parent 26a9b528da
commit 17ccd18ed3

View File

@ -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