Within Slicer vtkMath::Pi() is called at four location.  See details below.<br><br>We will make sure to use vtkMath::FloatPi() when we will integrate VTK 5.10.<br><br>Thanks<br>Jc<br><br><br><br>Modules/Loadable/Annotations/VTKWidgets/vtkAnnotationGlyphSource2D.cxx<br>

352:  theta = 2.0 * vtkMath::Pi() / 8.0;<br><br>Libs/MRML/Logic/vtkMRMLSliceLogic.cxx<br>2128:    double axisMisalignmentDegrees=acos(dotProd)*180.0/vtkMath::Pi();<br><br>Libs/vtkTeem/vtkPreciseHyperStreamline.cxx<br>591:  vtkFloatingPointType theta=2.0*vtkMath::Pi()/this->NumberOfSides;<br>

<br>Base/Logic/vtkSlicerGlyphSource2D.cxx<br>346:  theta = 2.0 * vtkMath::Pi() / 8.0<br><br><div class="gmail_quote">On Wed, Feb 29, 2012 at 6:41 PM, Jean-Christophe Fillion-Robin <span dir="ltr"><<a href="mailto:jchris.fillionr@kitware.com">jchris.fillionr@kitware.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">+1 :)<div class="HOEnZb"><div class="h5"><br><br><div class="gmail_quote">On Wed, Feb 29, 2012 at 4:57 PM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi All,<br>
<br>
I'm wondering if, for VTK 6, we can make the vtkMath::Pi() return a<br>
double instead of a float.  Currently, most VTK code is calling<br>
vtkMath::DoublePi() and, in my opinion, vtkMath::Pi() is more<br>
readable.<br>
<br>
Here's my proposal:<br>
<br>
1) In VTK 5.10, a vtkMath::FloatPi() method would be added.  Any VTK<br>
5.10 code that calls vtkMath::Pi() would be changed to call<br>
vtkMath::FloatPi() instead.<br>
<br>
2) In VTK 6, vtkMath::Pi() would be changed so that it returns double,<br>
and then all instances of vtkMath::DoublePi() can be changed to<br>
vtkMath::Pi() to improve readability.<br>
<br>
If anyone thinks this is a good idea, I can submit a patch for the VTK<br>
5.10 changes to gerrit.<br>
<br>
<br>
To reiterate what I'm proposing, in VTK 5.10, the following methods would exist:<br>
<br>
double vtkMath::DoublePi();<br>
float vtkMath::Pi();<br>
float vtkMath::FloatPi();  - new method for single precision<br>
<br>
In VTK 6.0, the following methods would exist:<br>
<br>
double vtkMath::DoublePi();<br>
double vtkMath::Pi();<br>
float vtkMath::FloatPi();<br>
<br>
 - David<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
</blockquote></div><br><br clear="all"><br></div></div><span class="HOEnZb"><font color="#888888">-- <br><a href="tel:%2B1%20919%20869%208849" value="+19198698849" target="_blank">+1 919 869 8849</a><br><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>+1 919 869 8849<br><br>