UKismetMathLibrary::NotEqualExactly_VectorVector
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns true if vectors A and B differ in any component by any amount (bitwise comparison, zero tolerance). The strict inequality counterpart to EqualExactly_VectorVector.
Caveats & Gotchas
- • Shares the same pitfall as EqualExactly_VectorVector — floating-point arithmetic almost always produces slightly different bit patterns, so this will return true even for 'mathematically equal' vectors derived through arithmetic. Use NotEqual_VectorVector with a tolerance for robustness.
- • Returns true for NaN comparisons in an unexpected way: IEEE 754 specifies that NaN != NaN, so a vector containing NaN will report as not-equal to itself — a subtle source of always-true conditions.
Signature
static UE_INL_API bool NotEqualExactly_VectorVector(FVector A, FVector B); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | FVector | First vector. | — |
| B | FVector | Second vector. | — |
Return Type
bool Example
Assert a vector changed from its known initial value C++
FVector KnownConstant = FVector(1.f, 0.f, 0.f);
FVector Candidate = GetForwardVector(); // expected to equal KnownConstant
ensure(UKismetMathLibrary::NotEqualExactly_VectorVector(Candidate, KnownConstant) == false); Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?