[vtk-developers] vtkMath inline choices...
David Gobbi
david.gobbi at gmail.com
Mon Jan 31 12:27:44 EST 2011
On Mon, Jan 31, 2011 at 9:04 AM, Sean McBride <sean at rogue-research.com> wrote:
> This part:
>
> + // calling isnan() instead of vtkMath::IsNan() improves performance
> +#ifdef VTK_HAS_ISNAN
> + if (isnan(v))
> +#else
> + if (vtkMath::IsNan(v))
> +#endif
>
> I'm sure you agree is silly, and can be done away with once we fix
> vtkMath::IsNan().
Yes, it is a bit silly, but I figured that improving the performance of
vtkLookupTable was the real goal. So I took the pragmatic approach.
Also, as silly as the code might look, it is easy to understand what it
is doing so I don't foresee it being a maintenance issue.
- David
More information about the vtk-developers
mailing list