public final void normalize ( ) { double norm ; norm = ( this . x * this . x + this . y * this . y + this . z * this . z + this . w * this . w ) ; if ( norm > 0f ) { norm = 1f / Math . sqrt ( norm ) ; this . x *= norm ; this . y *= norm ; this . z *= norm ; this . w *= norm ; } else { this . x = 0f ; this . y = 0f ; this . z = 0f ; this . w = 0f ; } }
Normalizes the value of this quaternion in place .