public void Invert() { double normSquaredInverse = 1.0 / (this.X * this.X + this.Y * this.Y + this.Z * this.Z + this.W * this.W); Quaternion q = this; q.Conjugate(); this.X = q.X * normSquaredInverse; this.Y = q.Y * normSquaredInverse; this.Z = q.Z * normSquaredInverse; this.W = q.W * normSquaredInverse; }