Import 2017-06-07 23:51:09: master 19c03077

Author Committer Branch Timestamp Parent
jcfr jcfr master 2015-10-28 19:39:19 master 104ef986
Changeset

COMP: Consistently use std::abs to avoid implicit integer truncations

Similarly to r24621 (BUG: Fix incorrect truncation to integer in
vtkSlicerTransformLogic), this commit applies the same fix to the entire
code base to avoid clang warnings of the following form:

Slicer/Base/Logic/vtkSlicerTransformLogic.cxx:718:59: warning: using integer absolute value function 'abs' when argument is of
floating point type [-Wabsolute-value]
rotateArrow->RotateX(vtkMath::DegreesFromRadians(acos(abs(sliceNormal_RAS[2]))));

Reviewed-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>

From: Hans Johnson <hans-johnson@uiowa.edu>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24671 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Modules/CLI/ExtractSkeleton/SkelGraph.cxx Diff File
mod - Modules/Scripted/EditorLib/Logic/vtkImageFillROI.cxx Diff File
mod - Modules/Scripted/EditorLib/Logic/vtkImageSlicePaint.cxx Diff File