UKismetMathLibrary::Not_Int
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Bitwise NOT of an integer (~A), flipping every bit. Typically used to produce an inverse mask for clearing flags with And_IntInt.
Caveats & Gotchas
- • This is bitwise NOT, not logical NOT. Not_Int(0) returns -1 (0xFFFFFFFF in two's complement), not 1. If you want to invert a boolean-like integer, compare against 0 instead.
- • Not_Int(Not_Int(A)) always returns A — the double-invert identity holds, but applying it accidentally doubles your Blueprint node count for no benefit.
Signature
static UE_INL_API int32 Not_Int(int32 A); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | int32 | The integer to bitwise-invert. | — |
Return Type
int32 Example
Clear a flag bit using NOT + AND C++
// Clear the burning flag
const int32 FLAG_BURNING = 0x08;
StatusFlags = UKismetMathLibrary::And_IntInt(StatusFlags, UKismetMathLibrary::Not_Int(FLAG_BURNING)); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?