code: public final void normalize(Quaternion q1) {
  		double norm;
  
  		norm = (q1.x*q1.x + q1.y*q1.y + q1.z*q1.z + q1.w*q1.w);
  
  		if (norm > 0f) {
  			norm = 1f/Math.sqrt(norm);
  			this.x = norm*q1.x;
  			this.y = norm*q1.y;
  			this.z = norm*q1.z;
  			this.w = norm*q1.w;
  		} else {
  			this.x = 0f;
  			this.y = 0f;
  			this.z = 0f;
  			this.w = 0f;
  		}
  	}
docs: Sets the value of this quaternion to the normalized value
  of quaternion q1.
  @param q1 the quaternion to be normalized.