Skip to content

Commit

Permalink
GlobalFog: Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
dscharrer committed Aug 14, 2018
1 parent 310c470 commit 43b6961
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/graphics/GlobalFog.cpp
Expand Up @@ -78,17 +78,11 @@ void ARX_GLOBALMODS_Reset() {
static float Approach(float current, float desired, float increment) {

if(desired > current) {
current += increment;

if (desired < current)
current = desired;
} else if (desired < current) {
current -= increment;

if (desired > current)
current = desired;
current = std::min(current + increment, desired);
} else if(desired < current) {
current = std::min(current - increment, desired);
}

return current;
}

Expand All @@ -97,7 +91,7 @@ void ARX_GLOBALMODS_Apply() {
ARX_PROFILE_FUNC();

float baseinc = g_framedelay;
float incdiv1000 = g_framedelay * ( 1.0f / 1000 );
float incdiv1000 = g_framedelay * 0.001f;

GLOBAL_MODS & current = g_currentFogParameters;
GLOBAL_MODS & desired = g_desiredFogParameters;
Expand Down

0 comments on commit 43b6961

Please sign in to comment.