From ae342ed4511cf2e144dcd27ce2c635d3d536f9ad Mon Sep 17 00:00:00 2001 From: Ankit Meel Date: Sat, 7 Nov 2020 18:24:56 +0530 Subject: Cleanup: Clang-tidy else-after-return --- intern/sky/source/sky_nishita.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'intern/sky/source') diff --git a/intern/sky/source/sky_nishita.cpp b/intern/sky/source/sky_nishita.cpp index f36bfcc3d7b..68fc2085448 100644 --- a/intern/sky/source/sky_nishita.cpp +++ b/intern/sky/source/sky_nishita.cpp @@ -112,10 +112,12 @@ static float density_mie(float height) static float density_ozone(float height) { float den = 0.0f; - if (height >= 10000.0f && height < 25000.0f) + if (height >= 10000.0f && height < 25000.0f) { den = 1.0f / 15000.0f * height - 2.0f / 3.0f; - else if (height >= 25000 && height < 40000) + } + else if (height >= 25000 && height < 40000) { den = -(1.0f / 15000.0f * height - 8.0f / 3.0f); + } return den; } @@ -133,15 +135,16 @@ static float phase_mie(float mu) /* Intersection helpers */ static bool surface_intersection(float3 pos, float3 dir) { - if (dir.z >= 0) + if (dir.z >= 0) { return false; + } float b = -2.0f * dot(dir, -pos); float c = len_squared(pos) - sqr(earth_radius); float t = b * b - 4.0f * c; - if (t >= 0.0f) + if (t >= 0.0f) { return true; - else - return false; + } + return false; } static float3 atmosphere_intersection(float3 pos, float3 dir) -- cgit v1.2.3