diff --git a/src/main/java/com/tocard/cam/LocationQuaternion2.java b/src/main/java/com/tocard/cam/LocationQuaternion2.java index 6337171..06cdd8a 100644 --- a/src/main/java/com/tocard/cam/LocationQuaternion2.java +++ b/src/main/java/com/tocard/cam/LocationQuaternion2.java @@ -1,8 +1,5 @@ package com.tocard.cam; -import javax.swing.DefaultBoundedRangeModel; - -import org.bukkit.Bukkit; import org.bukkit.Location; public class LocationQuaternion2 extends Location { @@ -14,7 +11,7 @@ public class LocationQuaternion2 extends Location { private float roll = 0; private static final float deg2grad = (float) Math.PI / 180.0f; - private static final float grad2deg = 180.0f / (float) Math.PI; + private static final float grad2deg = 1 / deg2grad; // https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles#Source_code public LocationQuaternion2(Location location) { @@ -131,7 +128,6 @@ public class LocationQuaternion2 extends Location { @Override public LocationQuaternion2 clone() { LocationQuaternion2 cloned = new LocationQuaternion2(this); - return cloned; } }