From 928be0facb3d0d4b24ca97baff6a8497056b30a8 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 15 Oct 2023 17:28:20 -0400 Subject: [PATCH] Named for context --- src/engine/InterestManagement/Terrain.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/engine/InterestManagement/Terrain.java b/src/engine/InterestManagement/Terrain.java index d6d2ee7e..36644ae4 100644 --- a/src/engine/InterestManagement/Terrain.java +++ b/src/engine/InterestManagement/Terrain.java @@ -206,19 +206,19 @@ public class Terrain { Vector2f normalizedOffset = new Vector2f(Math.abs(zone_offset.x) / this.zone.major_radius, Math.abs(zone_offset.y) / this.zone.minor_radius); - float value; + float blendCoefficient; if (normalizedOffset.x <= 1 - blend_ratio.x || normalizedOffset.x <= normalizedOffset.y) { if (normalizedOffset.y < 1 - blend_ratio.y) return 1; - value = (normalizedOffset.y - (1 - blend_ratio.y)) / blend_ratio.y; + blendCoefficient = (normalizedOffset.y - (1 - blend_ratio.y)) / blend_ratio.y; } else - value = (normalizedOffset.x - (1 - blend_ratio.x)) / blend_ratio.x; + blendCoefficient = (normalizedOffset.x - (1 - blend_ratio.x)) / blend_ratio.x; - value = (float) Math.atan((0.5f - value) * PI); + blendCoefficient = (float) Math.atan((0.5f - blendCoefficient) * PI); - return (value + 1) * 0.5f; + return (blendCoefficient + 1) * 0.5f; } }