@Test public void testInvert() { Quaternion inverse = Quaternion.fromAxisAngle(Vector3.zAxis(), Math.PI / 2).invert(); assertEquals(0, inverse.getX(), 1e-9); assertEquals(0, inverse.getY(), 1e-9); assertEquals(-0.7071067811865475, inverse.getZ(), 1e-9); assertEquals(0.7071067811865475, inverse.getW(), 1e-9); }
public Quaternion invert() { double mm = getMagnitudeSquared(); Preconditions.checkState(mm != 0); return conjugate().scale(1 / mm); }
Quaternion { public Quaternion invert() { double mm = getMagnitudeSquared(); Preconditions.checkState(mm != 0); return conjugate().scale(1 / mm); } }
Quaternion { public Quaternion invert() { double mm = getMagnitudeSquared(); Preconditions.checkState(mm != 0); return conjugate().scale(1 / mm); } Quaternion(double x, double y, double z, double w); }
Quaternion { public Quaternion invert() { double mm = getMagnitudeSquared(); Preconditions.checkState(mm != 0); return conjugate().scale(1 / mm); } Quaternion(double x, double y, double z, double w); static Quaternion fromAxisAngle(Vector3 axis, double angle); static Quaternion fromQuaternionMessage(geometry_msgs.Quaternion message); static Quaternion rotationBetweenVectors(Vector3 vector1, Vector3 vector2); static Quaternion identity(); Quaternion scale(double factor); Quaternion conjugate(); Quaternion invert(); Quaternion normalize(); Quaternion multiply(Quaternion other); Vector3 rotateAndScaleVector(Vector3 vector); double getX(); double getY(); double getZ(); double getW(); double getMagnitudeSquared(); double getMagnitude(); boolean isAlmostNeutral(double epsilon); geometry_msgs.Quaternion toQuaternionMessage(geometry_msgs.Quaternion result); boolean almostEquals(Quaternion other, double epsilon); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); }
Quaternion { public Quaternion invert() { double mm = getMagnitudeSquared(); Preconditions.checkState(mm != 0); return conjugate().scale(1 / mm); } Quaternion(double x, double y, double z, double w); static Quaternion fromAxisAngle(Vector3 axis, double angle); static Quaternion fromQuaternionMessage(geometry_msgs.Quaternion message); static Quaternion rotationBetweenVectors(Vector3 vector1, Vector3 vector2); static Quaternion identity(); Quaternion scale(double factor); Quaternion conjugate(); Quaternion invert(); Quaternion normalize(); Quaternion multiply(Quaternion other); Vector3 rotateAndScaleVector(Vector3 vector); double getX(); double getY(); double getZ(); double getW(); double getMagnitudeSquared(); double getMagnitude(); boolean isAlmostNeutral(double epsilon); geometry_msgs.Quaternion toQuaternionMessage(geometry_msgs.Quaternion result); boolean almostEquals(Quaternion other, double epsilon); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }