RealDocs

UKismetMathLibrary::EqualExactly_Vector2DVector2D

function Engine Blueprint Since 4.0
#include "Kismet/KismetMathLibrary.h"
Access: public Specifiers: staticUFUNCTIONBlueprintPure

Description

Returns true only if A and B are bit-exactly equal with no tolerance. Use only when comparing vectors that should be byte-identical, such as cached constants.

Caveats & Gotchas

  • Floating-point arithmetic almost never produces bit-exact results. Comparing vectors derived from any computation will almost always return false even when the values appear equal. Use EqualEqual_Vector2DVector2D with a tolerance instead.
  • In Blueprint this node appears as 'Equal Exactly (Vector2D)' with a '===' compact title to distinguish it from the near-equal '==' node.

Signature

static UE_INL_API bool EqualExactly_Vector2DVector2D(FVector2D A, FVector2D B);

Parameters

Name Type Description Default
A FVector2D The first vector.
B FVector2D The second vector.

Return Type

bool

Example

Check if a cached vector was unchanged C++
const FVector2D Zero = FVector2D::ZeroVector;
FVector2D Candidate(0.f, 0.f);
bool bIsZero = UKismetMathLibrary::EqualExactly_Vector2DVector2D(Candidate, Zero);
// true only if bits are identical

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.