I just took a look at vtk 5.6.1, and the Norm function looks like this:

// Description:

// Compute the norm of 3-vector.

static float Norm(const float x[3]) {

return static_cast<float> (sqrt( x[0] * x[0] + x[1] * x[1] + x[2] * x[2] ) );};

That means it returns the magnitude of the vector, and the Normalize method works as it should:

1. calculate magnitude

2. if it is not zero

3. divide all vector components by the magnitude

4. return magnitude

Nothing can be erased here, only made more clear, like this:

inline double vtkMath::Normalize(double x[3])

{

double den = vtkMath::Norm( x );

if ( den != 0.0 )

{

for (int i=0; i < 3; i++)

{

x[i] /= den;

}

}

return den;

}

_______________________________________________

Powered by www.kitware.com

Visit other Kitware open-source projects at

http://www.kitware.com/opensource/opensource.htmlPlease keep messages on-topic and check the VTK FAQ at:

http://www.vtk.org/Wiki/VTK_FAQFollow this link to subscribe/unsubscribe:

http://www.vtk.org/mailman/listinfo/vtkusers