Sets the value of this quaternion to the quaternion inverse of itself.
166805
public final void inverse() {
		double norm;  

		norm = 1f/(this.w*this.w + this.x*this.x + this.y*this.y + this.z*this.z);
		this.w *=  norm;
		this.x *= -norm;
		this.y *= -norm;
		this.z *= -norm;
	}
382194
def inverse(self):
        
        inv_rotation = self.rotation.T
        inv_translation = np.dot(-self.rotation.T, self.translation)
        return RigidTransform(inv_rotation, inv_translation,
                              from_frame=self._to_frame,
                              to_frame=self._from_frame)
1268810
public Quaternionf rotationTo(float toDirX, float toDirY, float toDirZ, Quaternionf dest) {
        return dest.rotationTo(x, y, z, toDirX, toDirY, toDirZ);
    }
653737
public void setT(int t) {
        this.t = Math.min((radius * 2 + 1) * (radius * 2 + 1) / 2, Math.max(0, t));
    }
1261412
def setto(self, s):
        
        length = len(s)
        self.b[self.j+1:self.j+1+length] = s
        self.k = self.j + length
1118638
function () {
    var data = this.data;
    var object3D = this.el.object3D;
    object3D.rotation.set(degToRad(data.x), degToRad(data.y), degToRad(data.z));
    object3D.rotation.order = 'YXZ';
  }
595596
public Quaternion fromAngleAxis (float angle, float x, float y, float z) {
        float sina = FloatMath.sin(angle / 2f);
        return set(x*sina, y*sina, z*sina, FloatMath.cos(angle / 2f));
    }
838670
public Quaternionf rotateLocalX(float angle, Quaternionf dest) {
        float hangle = angle * 0.5f;
        float s = (float) Math.sin(hangle);
        float c = (float) Math.cosFromSin(s, hangle);
        dest.set(c * x + s * w,
                 c * y - s * z,
                 c * z + s * y,
                 c * w - s * x);
        return dest;
    }
279889
def transform(self, v3):
        
        if isinstance(v3, Vector3):
            t = super(Quaternion, self).transform([v3.x, v3.y, v3.z])
            return Vector3(t[0], t[1], t[2])
        elif len(v3) == 3:
            return super(Quaternion, self).transform(v3)
        else:
            raise TypeError("param v3 is not a vector type")
763441
public Quaterniond premul(Quaterniondc q, Quaterniond dest) {
        dest.set(q.w() * x + q.x() * w + q.y() * z - q.z() * y,
                 q.w() * y - q.x() * z + q.y() * w + q.z() * x,
                 q.w() * z + q.x() * y - q.y() * x + q.z() * w,
                 q.w() * w - q.x() * x - q.y() * y - q.z() * z);
        return dest;
    }
693628
public Quaternion set (IQuaternion other) {
        return set(other.x(), other.y(), other.z(), other.w());
    }
195886
def orientation(self, value):
        ''''''
        for values in self.__orientation:
            if value in values:
                # can not set upside-down until api level 18.
                self.server.jsonrpc.setOrientation(values[1])
                break
        else:
            raise ValueError("Invalid orientation.")
1185413
def dual_quaternion(self):
        
        qr = self.quaternion
        qd = np.append([0], self.translation / 2.)
        return DualQuaternion(qr, qd)
474126
public Vector setAngle (double angle) {
        double l = length();
        return set(l * Math.cos(angle), l * Math.sin(angle));
    }
304976
def quaternion(self):
        
        q_xyzw = transformations.quaternion_from_matrix(self.matrix)
        q_wxyz = np.roll(q_xyzw, 1)
        return q_wxyz
113716
function() {

      var w = this['w'];
      var x = this['x'];
      var y = this['y'];
      var z = this['z'];

      if (y === 0 && z === 0) {
        return new Quaternion(
                logHypot(w, x),
                Math.atan2(x, w), 0, 0);
      }

      var qNorm2 = x * x + y * y + z * z + w * w;
      var vNorm = Math.sqrt(x * x + y * y + z * z);

      var scale = Math.atan2(vNorm, w) / vNorm;

      return new Quaternion(
              Math.log(qNorm2) * 0.5,
              x * scale,
              y * scale,
              z * scale);
    }
773933
public Quaternion fromVectorFromNegativeZ (IVector3 to) {
        return fromVectorFromNegativeZ(to.x(), to.y(), to.z());
    }