From: Wolfgang Bangerth Date: Fri, 4 Nov 2016 20:31:09 +0000 (-0600) Subject: Clarify the intent of a piece of code. X-Git-Tag: v8.5.0-rc1~466^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff56e274810658a7f2af045141417d77205cf865;p=dealii.git Clarify the intent of a piece of code. The code uses integer division, followed by a double precision multiplication. It is admittedly not immediately obvious what it is supposed to do. Clarify that we really mean the integer division. --- diff --git a/source/base/quadrature.cc b/source/base/quadrature.cc index 21bc38dc08..2da3f1d76f 100644 --- a/source/base/quadrature.cc +++ b/source/base/quadrature.cc @@ -663,17 +663,17 @@ QProjector<3>::project_to_subface (const Quadrature<2> &quadrature, { case RefinementCase::cut_x: xi_scale=0.5; - xi_translation=subface_no%2 * 0.5; + xi_translation = subface_no%2 * 0.5; break; case RefinementCase::cut_y: eta_scale=0.5; - eta_translation=subface_no%2 * 0.5; + eta_translation = subface_no%2 * 0.5; break; case RefinementCase::cut_xy: xi_scale= 0.5; eta_scale=0.5; - xi_translation =subface_no%2 * 0.5; - eta_translation=subface_no/2 * 0.5; + xi_translation = int(subface_no%2) * 0.5; + eta_translation = int(subface_no/2) * 0.5; break; default: Assert(false,ExcInternalError());