diff options
author | Joel Bodenmann <joel@seriouslyembedded.com> | 2015-11-28 23:41:24 +0100 |
---|---|---|
committer | Joel Bodenmann <joel@seriouslyembedded.com> | 2015-11-28 23:41:24 +0100 |
commit | 02e793e5db3ea240432d43c3f9ab098516df1173 (patch) | |
tree | 1fc2f98790ba5b7cf70c75b4dd2c062e31d42f6f /src/gmisc | |
parent | 5a99092b794373966e444296c57991631e712c70 (diff) | |
download | uGFX-02e793e5db3ea240432d43c3f9ab098516df1173.tar.gz uGFX-02e793e5db3ea240432d43c3f9ab098516df1173.tar.bz2 uGFX-02e793e5db3ea240432d43c3f9ab098516df1173.zip |
using GFX_PI internally to avoid issues with M_PI
Diffstat (limited to 'src/gmisc')
-rw-r--r-- | src/gmisc/gmisc.h | 6 | ||||
-rw-r--r-- | src/gmisc/gmisc_matrix2d.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gmisc/gmisc.h b/src/gmisc/gmisc.h index 7ce91442..aa845261 100644 --- a/src/gmisc/gmisc.h +++ b/src/gmisc/gmisc.h @@ -75,14 +75,14 @@ typedef int32_t fixed; /** * @brief The famous number pi */ -#ifndef PI - #define PI 3.1415926535897932384626433832795028841971693993751 +#ifndef GFX_PI + #define GFX_PI 3.1415926535897932384626433832795028841971693993751 #endif /** * @brief pi as a fixed point */ -#define FIXED_PI FP2FIXED(PI) +#define FIXED_PI FP2FIXED(GFX_PI) /*===========================================================================*/ /* External declarations. */ diff --git a/src/gmisc/gmisc_matrix2d.c b/src/gmisc/gmisc_matrix2d.c index 2cd162f2..352afbe7 100644 --- a/src/gmisc/gmisc_matrix2d.c +++ b/src/gmisc/gmisc_matrix2d.c @@ -75,7 +75,7 @@ void gmiscMatrixFloat2DApplyRotation(MatrixFloat2D *dst, const MatrixFloat2D *sr s = fsin(angle); c = fcos(angle); #else - c = angle*M_PI/180; + c = angle*GFX_PI/180; s = sin(c); c = cos(c); #endif |