diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-25 11:33:28 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-25 13:17:08 +0300 |
commit | f68cfd6bb078482c4a779a6e26a56e2734edb5b8 (patch) | |
tree | 2878e5b80dba5bdeba186d99661d604eb38879cd /intern/sky/source/sky_model.cpp | |
parent | c7b247a118e302a3afc6473797e53b6af28b69e2 (diff) |
Cleanup: replace C-style casts with functional casts for numeric types
Diffstat (limited to 'intern/sky/source/sky_model.cpp')
-rw-r--r-- | intern/sky/source/sky_model.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/intern/sky/source/sky_model.cpp b/intern/sky/source/sky_model.cpp index d67fe08772d..4181605b9e4 100644 --- a/intern/sky/source/sky_model.cpp +++ b/intern/sky/source/sky_model.cpp @@ -120,8 +120,8 @@ static void ArHosekSkyModel_CookConfiguration(ArHosekSkyModel_Dataset dataset, { const double *elev_matrix; - int int_turbidity = (int)turbidity; - double turbidity_rem = turbidity - (double)int_turbidity; + int int_turbidity = int(turbidity); + double turbidity_rem = turbidity - double(int_turbidity); solar_elevation = pow(solar_elevation / (MATH_PI / 2.0), (1.0 / 3.0)); @@ -195,8 +195,8 @@ static double ArHosekSkyModel_CookRadianceConfiguration(ArHosekSkyModel_Radiance { const double *elev_matrix; - int int_turbidity = (int)turbidity; - double turbidity_rem = turbidity - (double)int_turbidity; + int int_turbidity = int(turbidity); + double turbidity_rem = turbidity - double(int_turbidity); double res; solar_elevation = pow(solar_elevation / (MATH_PI / 2.0), (1.0 / 3.0)); @@ -274,7 +274,7 @@ double SKY_arhosekskymodel_radiance(SKY_ArHosekSkyModelState *state, double gamma, double wavelength) { - int low_wl = (int)((wavelength - 320.0) / 40.0); + int low_wl = int((wavelength - 320.0) / 40.0); if (low_wl < 0 || low_wl >= 11) { return 0.0; |