From 8f26f077e777b38a13bc8e33c3e4647de0ce3044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Mon, 16 May 2022 21:03:19 +0200 Subject: [PATCH] style: LocationQuaternion2 --- src/main/java/com/tocard/cam/LocationQuaternion2.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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; } }