[vtk-developers] DoublePi proposal

Jean-Christophe Fillion-Robin jchris.fillionr at kitware.com
Wed Feb 29 18:41:10 EST 2012


+1 :)

On Wed, Feb 29, 2012 at 4:57 PM, David Gobbi <david.gobbi at gmail.com> wrote:

> Hi All,
>
> I'm wondering if, for VTK 6, we can make the vtkMath::Pi() return a
> double instead of a float.  Currently, most VTK code is calling
> vtkMath::DoublePi() and, in my opinion, vtkMath::Pi() is more
> readable.
>
> Here's my proposal:
>
> 1) In VTK 5.10, a vtkMath::FloatPi() method would be added.  Any VTK
> 5.10 code that calls vtkMath::Pi() would be changed to call
> vtkMath::FloatPi() instead.
>
> 2) In VTK 6, vtkMath::Pi() would be changed so that it returns double,
> and then all instances of vtkMath::DoublePi() can be changed to
> vtkMath::Pi() to improve readability.
>
> If anyone thinks this is a good idea, I can submit a patch for the VTK
> 5.10 changes to gerrit.
>
>
> To reiterate what I'm proposing, in VTK 5.10, the following methods would
> exist:
>
> double vtkMath::DoublePi();
> float vtkMath::Pi();
> float vtkMath::FloatPi();  - new method for single precision
>
> In VTK 6.0, the following methods would exist:
>
> double vtkMath::DoublePi();
> double vtkMath::Pi();
> float vtkMath::FloatPi();
>
>  - David
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>


-- 
+1 919 869 8849
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20120229/62e3ff94/attachment.html>


More information about the vtk-developers mailing list