Normalize

Normalize

Choose your operating system:

Windows

macOS

Linux

Gets a normalized unit copy of the vector, ensuring it is safe to do so based on the length. Returns zero vector if vector length is too small to safely normalize.

Target is Kismet Math Library

Normalize
A
X0
Y 0
Z 0
Tolerance
Return Value
X0
Y 0
Z 0

Inputs

A
Vector
Tolerance
Float (single-precision)

Minimum squared vector length.

Outputs

Return Value
Vector

A normalized copy if safe, (0,0,0) otherwise.