From 65235b33d725449d2ea91065c1b20ca53c793493 Mon Sep 17 00:00:00 2001 From: David Wells Date: Sat, 25 Jun 2016 17:30:21 -0400 Subject: [PATCH] Make some temporary variables const. --- examples/step-25/step-25.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/step-25/step-25.cc b/examples/step-25/step-25.cc index 5ee224cf58..c7f18d23c2 100644 --- a/examples/step-25/step-25.cc +++ b/examples/step-25/step-25.cc @@ -193,15 +193,15 @@ namespace Step25 case 3: { - double theta = numbers::PI/4; - double phi = numbers::PI/4; - double tau = 1.; - double c0 = 1.; - double s = 1.; - double arg = p[0]*std::cos(theta) + - p[1]*std::sin(theta) * std::cos(phi) + - std::sin(theta) * std::sin(phi) * - (p[2]*std::cosh(tau)+t*std::sinh(tau)); + const double theta = numbers::PI/4; + const double phi = numbers::PI/4; + const double tau = 1.; + const double c0 = 1.; + const double s = 1.; + const double arg = p[0]*std::cos(theta) + + p[1]*std::sin(theta) * std::cos(phi) + + std::sin(theta) * std::sin(phi) * + (p[2]*std::cosh(tau)+t*std::sinh(tau)); return 4.*std::atan(c0*std::exp(s*arg)); } -- 2.39.5