style: LocationQuaternion2
This commit is contained in:
parent
9b2f56ac83
commit
8f26f077e7
|
@ -1,8 +1,5 @@
|
||||||
package com.tocard.cam;
|
package com.tocard.cam;
|
||||||
|
|
||||||
import javax.swing.DefaultBoundedRangeModel;
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
|
|
||||||
public class LocationQuaternion2 extends Location {
|
public class LocationQuaternion2 extends Location {
|
||||||
|
@ -14,7 +11,7 @@ public class LocationQuaternion2 extends Location {
|
||||||
private float roll = 0;
|
private float roll = 0;
|
||||||
|
|
||||||
private static final float deg2grad = (float) Math.PI / 180.0f;
|
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
|
// https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles#Source_code
|
||||||
public LocationQuaternion2(Location location) {
|
public LocationQuaternion2(Location location) {
|
||||||
|
@ -131,7 +128,6 @@ public class LocationQuaternion2 extends Location {
|
||||||
@Override
|
@Override
|
||||||
public LocationQuaternion2 clone() {
|
public LocationQuaternion2 clone() {
|
||||||
LocationQuaternion2 cloned = new LocationQuaternion2(this);
|
LocationQuaternion2 cloned = new LocationQuaternion2(this);
|
||||||
|
|
||||||
return cloned;
|
return cloned;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue