MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / getEulerAnglesXYZ

Method getEulerAnglesXYZ

src/main/java/field/linalg/Quat.java:1692–1697  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 /**

Callers

nothing calls this directly

Calls 1

asinMethod · 0.80

Tested by

no test coverage detected