FVector::GetSafeNormal2D

Gets a normalized copy of the 2D components of the vector, checking it is safe to do so.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Math/Vector.h

Include

#include "Math/Vector.h"

Syntax

FVector GetSafeNormal2D
(
    float Tolerance
) const

Remarks

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 if vector length is too small to normalize.

Returns

Normalized copy if safe, otherwise returns zero vector.

Parameters

Parameter

Description

Tolerance

Minimum squared vector length.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss