Get the euler angles in radians in rotation sequence XYZ of this quaternion and store them in the provided parameter eulerAngles . @param eulerAngles will hold the euler angles in radians @return the passed in vector
(Vec3 eulerAngles)
| 1690 | * @param eulerAngles will hold the euler angles in radians |
| 1691 | * @return the passed in vector |
| 1692 | */ |
| 1693 | public Vec3 getEulerAnglesXYZ(Vec3 eulerAngles) { |
| 1694 | eulerAngles.x = Math.atan2(2.0 * (x * w - y * z), 1.0 - 2.0 * (x * x + y * y)); |
| 1695 | eulerAngles.y = Math.asin(2.0 * (x * z + y * w)); |
| 1696 | eulerAngles.z = Math.atan2(2.0 * (z * w - x * y), 1.0 - 2.0 * (y * y + z * z)); |
| 1697 | return eulerAngles; |
| 1698 | } |
| 1699 | |
| 1700 | /** |