diff options
author | Chris Robinson <[email protected]> | 2023-02-11 20:03:18 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-02-11 20:03:18 -0800 |
commit | 44b6ac7db0c639a55441076042475cfae5a76d05 (patch) | |
tree | d663dc61f949cfb792ae1fd43edebaa74db13002 /core | |
parent | 31a94ca564f8de584f338da3ca7221060683a927 (diff) |
Explicitly cast a size_t to double
Diffstat (limited to 'core')
-rw-r--r-- | core/cubic_tables.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/cubic_tables.cpp b/core/cubic_tables.cpp index 18af3bb3..73ec6b3f 100644 --- a/core/cubic_tables.cpp +++ b/core/cubic_tables.cpp @@ -25,7 +25,7 @@ struct SplineFilterArray { /* Fill in the main coefficients. */ for(size_t pi{0};pi < CubicPhaseCount;++pi) { - const double mu{pi / double{CubicPhaseCount}}; + const double mu{static_cast<double>(pi) / CubicPhaseCount}; const double mu2{mu*mu}, mu3{mu2*mu}; mTable[pi].mCoeffs[0] = static_cast<float>(-0.5*mu3 + mu2 + -0.5*mu); mTable[pi].mCoeffs[1] = static_cast<float>( 1.5*mu3 + -2.5*mu2 + 1.0); |