Browse Source

fix Quat.toEuler

ncannasse 11 years ago
parent
commit
f42a8ca358
1 changed files with 3 additions and 3 deletions
  1. 3 3
      h3d/Quat.hx

+ 3 - 3
h3d/Quat.hx

@@ -153,9 +153,9 @@ class Quat {
 	
 	public function toEuler() {
 		return new Vector(
-			hxd.Math.atan2(2 * (y * w + x * z), 1 - 2 * (y * y + z * z)),
-			(2 * (x * y + z * w)).asin(),
-			hxd.Math.atan2(2 * (x * w - y * z), 1 - 2 * (x * x + z * z))
+			hxd.Math.atan2(2 * (x * w + y * z), 1 - 2 * (x * x + z * z)),
+			hxd.Math.atan2(2 * (y * w - x * z), 1 - 2 * (y * y - z * z)),
+			(2 * (x * y + z * w)).asin()
 		);
 	}