UKismetMathLibrary::Not_Int64
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns the bitwise NOT of A (~A), flipping every bit in the 64-bit representation. Used to produce complement masks for bitwise AND operations.
Caveats & Gotchas
- • Bitwise NOT of a non-negative value always produces a negative result because bit 63 (the sign bit) gets flipped. If you need the result treated as an unsigned mask, cast to uint64 in C++ before using it.
- • ~0 in int64 is -1, not 0 — a common mistake when trying to clear a full flags field. Assign 0 directly rather than using Not_Int64(0) if you want to zero out all bits.
Signature
static UE_INL_API int64 Not_Int64(int64 A); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | int64 | Value to bitwise-invert. | — |
Return Type
int64 Example
Clear a specific bit using NOT and AND C++
const int64 DebugFlag = (1LL << 10);
int64 Flags = GetFlags();
Flags = UKismetMathLibrary::And_Int64Int64(Flags, UKismetMathLibrary::Not_Int64(DebugFlag)); See Also
Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?