From fc0ef3eef0763ea2d777490686128792eb027c09 Mon Sep 17 00:00:00 2001 From: mezz Date: Tue, 3 Mar 2015 00:01:55 -0800 Subject: [PATCH] replace confusing for loops that have no body --- .../apiculture/render/TextureHabitatLocator.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/main/java/forestry/apiculture/render/TextureHabitatLocator.java b/src/main/java/forestry/apiculture/render/TextureHabitatLocator.java index 26e12266d..01df78f82 100644 --- a/src/main/java/forestry/apiculture/render/TextureHabitatLocator.java +++ b/src/main/java/forestry/apiculture/render/TextureHabitatLocator.java @@ -75,10 +75,9 @@ public class TextureHabitatLocator extends TextureAtlasSprite { if (!hasSpin) { currentAngle = targetAngle; } else { - double angleChange; - - for (angleChange = targetAngle - currentAngle; angleChange < -Math.PI; angleChange += (Math.PI * 2D)) { - ; + double angleChange = targetAngle - currentAngle; + while (angleChange < -Math.PI) { + angleChange += (Math.PI * 2D); } while (angleChange >= Math.PI) { @@ -98,10 +97,9 @@ public class TextureHabitatLocator extends TextureAtlasSprite { this.currentAngle += this.angleDelta; } - int i; - - for (i = (int) ((this.currentAngle / (Math.PI * 2D) + 1.0d) * this.framesTextureData.size()) % this.framesTextureData.size(); i < 0; i = (i + this.framesTextureData.size()) % this.framesTextureData.size()) { - ; + int i = (int) ((this.currentAngle / (Math.PI * 2D) + 1.0d) * this.framesTextureData.size()) % this.framesTextureData.size(); + while (i < 0) { + i = (i + this.framesTextureData.size()) % this.framesTextureData.size(); } if (i != this.frameCounter) {