# Add Vector3::getNormalizedIfNotZero() and correct Vector3::getNormalizedOrZero()

The name of the function `getNormalizedOrZero()`

in `src/core/math/Vector3.h`

is somewhat misleading. One might naively expect that the returned `Vector3`

is either normalized or exactly zero.
However, if its length is found to be too small, the function actually returns the original `Vector3`

, the components of which must not be exactly zero.

This merge request renames the above function and all its occurrences to `getNormalizedIfNotZero()`

. It additionally adds the function `getNormalizedOrZero()`

that actually returns a zero-`Vector3`

when the original vector's length is too small.

Edited by Christoph Schwarzmeier