[vtk-developers] vtkMath::Ceil() and vtkMath::Floor()

David Doria daviddoria at gmail.com
Thu Jun 2 18:42:48 EDT 2011


On Thu, Jun 2, 2011 at 6:29 PM, David Gobbi <david.gobbi at gmail.com> wrote:
> Hi Philippe,
>
> The trailing bits are important in this line:
> int g = ( x < 0 );
> which compares the original "x" against zero.
>
> But the static_cast<int>(x) throws away all trailing bits on purpose,
> the intent of the double cast is to check whether throwing away the
> trailing bits changes the value of the double.
>
>  - David

Would one of you add this discussion as comments in the code?

David



More information about the vtk-developers mailing list