public Vector3f normalizeLocal() {
        // NOTE: this implementation is more optimized
        // than the old jme normalize as this method
        // is commonly used.
        float length = x * x + y * y + z * z;
        if (length != 1f && length != 0f) {
            length = 1.0f / FastMath.sqrt(length);
            x *= length;
            y *= length;
            z *= length;
        }
        return this;
    }
Normalizes the vector to length=1 and returns the (modified) current
instance. If the vector has length=0, it's unchanged.

@return the (modified) current instance (for chaining)
jme3-core/src/main/java/com/jme3/math/Vector3f.java