UKismetMathLibrary::Quat_IsNonFinite
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Returns true if any component (X, Y, Z, or W) is NaN or Infinity. This is the logical negation of Quat_IsFinite.
Caveats & Gotchas
- • This returns true for either NaN or Inf — it does not distinguish between them. If you need to differentiate, check components with FMath::IsNaN / FMath::IsInfinite individually.
- • In Blueprint, use this (rather than the negation of IsFinite) when your logic branches on corruption, to avoid an extra Not node and potential readability confusion.
Signature
static UE_INL_API bool Quat_IsNonFinite(const FQuat& Q) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Q | const FQuat& | The quaternion to test. | — |
Return Type
bool Example
Early-out on corrupt rotation data C++
FQuat IncomingRot = GetReplicatedRotation();
if (UKismetMathLibrary::Quat_IsNonFinite(IncomingRot))
{
UE_LOG(LogTemp, Error, TEXT("Received non-finite quaternion over network"));
return;
}
ApplyRotation(IncomingRot); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?