- use degrees for quaternion properties
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7725 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
41017fdacf
commit
090e57b224
@ -74,7 +74,7 @@ public class QuaternionPropertyEditor implements PropertyEditor {
|
|||||||
|
|
||||||
public String getAsText() {
|
public String getAsText() {
|
||||||
float[] angles=quaternion.toAngles(new float[3]);
|
float[] angles=quaternion.toAngles(new float[3]);
|
||||||
return "[" + angles[0] + ", " + angles[1] + ", " + angles[2] + "]";
|
return "[" + (float)Math.toDegrees(angles[0]) + ", " + (float)Math.toDegrees(angles[1]) + ", " + (float)Math.toDegrees(angles[2]) + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAsText(String text) throws IllegalArgumentException {
|
public void setAsText(String text) throws IllegalArgumentException {
|
||||||
@ -87,7 +87,7 @@ public class QuaternionPropertyEditor implements PropertyEditor {
|
|||||||
float[] floats = new float[3];
|
float[] floats = new float[3];
|
||||||
for (int i = 0; i < values.length; i++) {
|
for (int i = 0; i < values.length; i++) {
|
||||||
String string = values[i];
|
String string = values[i];
|
||||||
floats[i] = Float.parseFloat(string);
|
floats[i] = (float)Math.toRadians(Float.parseFloat(string));
|
||||||
}
|
}
|
||||||
Quaternion old=new Quaternion();
|
Quaternion old=new Quaternion();
|
||||||
old.set(quaternion);
|
old.set(quaternion);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user