Bug 1995

Summary: avoid redefining PI constant
Product: ns-3 Reporter: Tom Henderson <tomh>
Component: generalAssignee: Ben Newton <bn>
Status: RESOLVED FIXED    
Severity: normal CC: bn
Priority: P5    
Version: pre-release   
Hardware: PC   
OS: Linux   
Attachments: Mercurial patch file for M_PI bug fix.

Description Tom Henderson 2014-09-26 18:14:28 UTC
reported by Ben Newton:
http://mailman.isi.edu/pipermail/ns-developers/2014-September/012289.html

suggest to replace with M_PI from math.h
Comment 1 Tom Henderson 2014-09-26 18:18:14 UTC
Ben Newton (not a current bugzilla user) may be preparing a patch for this.
Comment 2 Ben Newton 2014-10-08 12:32:08 UTC
Created attachment 1899 [details]
Mercurial patch file for M_PI bug fix.

Changed PI references to use M_PI
Comment 3 Ben Newton 2014-10-08 12:35:27 UTC
Changed all references to 3.1415... to use M_PI instead.  Nothing broke, although there were some pieces changed that don't have tests in place.  May be very slight differences in some calculations due to resolution change.  Patch is attached.  Used hg diff to export the patch. Let me know if something different is needed. 

Note.  I didn't attempt to change any of the references to 3.14... in the test suites.

Thanks,
   Ben Newton
Comment 4 Tom Henderson 2014-11-07 18:09:30 UTC
committed in changeset 11057:35e001b4202d