Bug 1995 - avoid redefining PI constant
avoid redefining PI constant
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: general
pre-release
PC Linux
: P5 normal
Assigned To: Ben Newton
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-26 18:14 EDT by Tom Henderson
Modified: 2014-11-07 18:09 EST (History)
1 user (show)

See Also:


Attachments
Mercurial patch file for M_PI bug fix. (7.52 KB, patch)
2014-10-08 12:32 EDT, Ben Newton
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Henderson 2014-09-26 18:14:28 EDT
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 EDT
Ben Newton (not a current bugzilla user) may be preparing a patch for this.
Comment 2 Ben Newton 2014-10-08 12:32:08 EDT
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 EDT
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 EST
committed in changeset 11057:35e001b4202d