From bc6406413211e543d16f2af0a94ac27ad75cbbb3 Mon Sep 17 00:00:00 2001 From: Simon Rit Date: Thu, 26 Jul 2012 13:13:26 +0200 Subject: [PATCH] simplified code --- vv/vvSlicer.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vv/vvSlicer.cxx b/vv/vvSlicer.cxx index 1e133d6..2478205 100644 --- a/vv/vvSlicer.cxx +++ b/vv/vvSlicer.cxx @@ -920,9 +920,8 @@ void vvSlicer::UpdateDisplayExtent() double cpos = (double)cam->GetPosition()[this->SliceOrientation]; double range = fabs(spos - cpos); double *spacing = input->GetSpacing(); - double avg_spacing = - ((double)spacing[0] + (double)spacing[1] + (double)spacing[2]) / 3.0; - cam->SetClippingRange(range - avg_spacing * 3.0, range + avg_spacing * 3.0); + double sumSpacing = spacing[0] + spacing[1] + spacing[2]; + cam->SetClippingRange(range - sumSpacing, range + sumSpacing); } } } -- 2.47.1