Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/TVector
Description
Gets a normalized copy of the 2D components of the vector, checking it is safe to do so. Z is set to zero. Returns zero vector by default if vector length is too small to normalize.
| Name | GetSafeNormal2D |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Math/Vector.h |
| Include Path | #include "Math/Vector.h" |
TVector < T > GetSafeNormal2D
(
T Tolerance,
const TVector < T > & ResultIfZero
) const
Normalized copy if safe, otherwise returns ResultIfZero.
Parameters
| Name | Remarks |
|---|---|
| Tolerance | Minimum squared vector length. Must be positive. |