RealDocs

UKismetMathLibrary::EqualExactly_Vector4Vector4

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

Description

Returns true only if all four components of A are bitwise-identical to their counterparts in B. No floating-point tolerance is applied.

Caveats & Gotchas

  • Exact floating-point equality is almost always wrong for computed values. Two vectors that are 'the same' after any arithmetic may differ by an ULP and return false here. Prefer EqualEqual_Vector4Vector4 with a tolerance for runtime comparisons.
  • NaN comparisons always return false in IEEE 754, so two vectors both containing NaN will not compare equal with this function.

Signature

static UE_INL_API bool EqualExactly_Vector4Vector4(const FVector4& A, const FVector4& B)

Parameters

Name Type Description Default
A const FVector4& First vector.
B const FVector4& Second vector to compare against.

Return Type

bool

Example

Check identity — only safe for values that were assigned, not computed C++
FVector4 A(1.0, 2.0, 3.0, 4.0);
FVector4 B = A; // direct copy
bool bSame = UKismetMathLibrary::EqualExactly_Vector4Vector4(A, B); // true

FVector4 C = UKismetMathLibrary::Add_Vector4Vector4(A, FVector4(0,0,0,0));
// bSame may still be true here, but do not rely on it after arithmetic.

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.