[cig-commits] [commit] QA: Remove unnecessary math constants. (042ff2e)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Mon Jan 20 11:49:07 PST 2014


Repository : ssh://geoshell/specfem2d

On branch  : QA
Link       : https://github.com/geodynamics/specfem2d/compare/28743f19b9f9fdb75d359c135053825c0ffd05b3...5e8aa55e68fd17b6f475fb65531b84195e497aa1

>---------------------------------------------------------------

commit 042ff2ed2095f7ca198291d36a553b2a08be9d66
Author: Elliott Sales de Andrade <esalesde at physics.utoronto.ca>
Date:   Mon Jan 6 01:06:48 2014 -0500

    Remove unnecessary math constants.
    
    These are already defined in math.h.


>---------------------------------------------------------------

042ff2ed2095f7ca198291d36a553b2a08be9d66
 src/specfem2D/attenuation_compute_param.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/specfem2D/attenuation_compute_param.c b/src/specfem2D/attenuation_compute_param.c
index d172c4e..cdd53a7 100644
--- a/src/specfem2D/attenuation_compute_param.c
+++ b/src/specfem2D/attenuation_compute_param.c
@@ -14,8 +14,7 @@
 
 /* useful constants */
 
-#define PI 3.14159265358979
-#define PI2 6.28318530717958
+#define PI2 (2 * M_PI)
 
 /* It is called in "attenuation_model.f90". */
 void
@@ -379,11 +378,6 @@ int m,n;
 #include <signal.h>
 #include <stdlib.h>
 
-/* useful constants */
-
-#define PI 3.14159265358979
-#define PI2 6.28318530717958
-
 void constant_Q2_sub(f1, f2, n, Q, tau_s, tau_e)
 
   int             n;



More information about the CIG-COMMITS mailing list