[vtkusers] Useless comupations in vtkMath

al.gry al.gry at web.de
Mon Aug 15 02:58:01 EDT 2011


Hi everyone,

I posted this thread last week but it wasn't accepted so Im trying again. 

I just looked into vtkMath source code provided via VTK.git and I found
things like this:

inline double vtkMath::Normalize(double x[3])
{
  double den;
  if ( ( den = vtkMath::Norm( x ) ) != 0.0 )
    {
    for (int i=0; i < 3; i++)
      {
      x[i] /= den;
      }
    }
  return den;
}

I guess the for-loop can be erased since it's useless... btw, if-instruction
doesn't do anything so it's also useless.

Regards, Al 

--
View this message in context: http://vtk.1045678.n5.nabble.com/Useless-comupations-in-vtkMath-tp4700083p4700083.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list