diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/util/FastTrig.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/util/FastTrig.java index f97ffed2..7a03d2fc 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/util/FastTrig.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/util/FastTrig.java @@ -7,20 +7,20 @@ public class FastTrig { /** * Precision. */ - private static final int precision = 100; + private static final int PRECISION = 100; /** * Modulus. */ - private static final int modulus = 360 * precision; + private static final int MODULUS = 360 * PRECISION; /** * Sin lookup table. */ - private static final double[] SIN_LOOKUP = new double[modulus]; + private static final double[] SIN_LOOKUP = new double[MODULUS]; private static double sinLookup(final int a) { - return a >= 0 ? SIN_LOOKUP[a % modulus] : -SIN_LOOKUP[-a % modulus]; + return a >= 0 ? SIN_LOOKUP[a % MODULUS] : -SIN_LOOKUP[-a % MODULUS]; } /** @@ -30,7 +30,7 @@ public class FastTrig { * @return The sin. */ public static double sin(final double a) { - return sinLookup((int) (a * precision + 0.5f)); + return sinLookup((int) (a * PRECISION + 0.5f)); } /** @@ -40,13 +40,13 @@ public class FastTrig { * @return The cosine. */ public static double cos(final double a) { - return sinLookup((int) ((a + 90f) * precision + 0.5f)); + return sinLookup((int) ((a + 90f) * PRECISION + 0.5f)); } static { for (int i = 0; i < SIN_LOOKUP.length; i++) { - SIN_LOOKUP[i] = Math.sin((i * Math.PI) / (precision * 180)); + SIN_LOOKUP[i] = Math.sin((i * Math.PI) / (PRECISION * 180)); } } }