RealDocs

UKismetMathLibrary::NotEqual_MatrixMatrix

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

Description

Returns true if any element of matrix A differs from the corresponding element of B by more than the given tolerance. The logical inverse of EqualEqual_MatrixMatrix.

Caveats & Gotchas

  • The function returns true as soon as any single element differs beyond tolerance — it does not indicate which elements differ or by how much.
  • Like EqualEqual_MatrixMatrix, this is a raw element comparison. Matrices that are semantically equivalent transforms (same orientation, same position) but differ only in scale will return true (not equal).

Signature

static UE_INL_API bool NotEqual_MatrixMatrix(const FMatrix& A, const FMatrix& B, float Tolerance = 1.e-4f)

Parameters

Name Type Description Default
A const FMatrix& The first matrix to compare.
B const FMatrix& The second matrix to compare.
Tolerance float Per-element error tolerance for the comparison. 1.e-4f

Return Type

bool

Example

Dirty-check a cached bone matrix before updating C++
if (UKismetMathLibrary::NotEqual_MatrixMatrix(NewBoneMatrix, CachedBoneMatrix))
{
    CachedBoneMatrix = NewBoneMatrix;
    UpdateSkinning();
}

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.