]> Creatis software - clitk.git/commitdiff
Use nan of std lib instead of sqrt(-1)
authorSimon Rit <simon.rit@creatis.insa-lyon.fr>
Thu, 21 Apr 2011 12:34:11 +0000 (14:34 +0200)
committerSimon Rit <simon.rit@creatis.insa-lyon.fr>
Thu, 21 Apr 2011 12:34:11 +0000 (14:34 +0200)
vv/vvSlicer.cxx

index 88c5676c3460174e07665225a7bf8248a4566808..42f83034b7fb78ed38f96ceba186be1d89998bc4 100644 (file)
@@ -1161,7 +1161,7 @@ double vvSlicer::GetScalarComponentAsDouble(vtkImageData *image, int X, double Y
       iy > image->GetWholeExtent()[3] ||
       iz < image->GetWholeExtent()[4] ||
       iz > image->GetWholeExtent()[5] )
-    return sqrt(-1.);
+    return std::numeric_limits<double>::quiet_NaN();
 
   image->SetUpdateExtent(ix, ix, iy, iy, iz, iz);
   image->Update();