UKismetMathLibrary::And_Int64Int64
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Performs a bitwise AND on A and B and returns the result. Commonly used to test or isolate individual bits in a 64-bit flags field.
Caveats & Gotchas
- • Bitwise AND on a signed int64 preserves the sign bit — masking with a value that has bit 63 set can turn a positive number negative. Use uint64 casts in C++ when dealing with unsigned bit fields to avoid signed/unsigned confusion.
- • Blueprint does not expose uint64 natively, so unsigned bit-field semantics are unavailable from Blueprint; be especially careful with masks that touch the high 32 bits.
Signature
static UE_INL_API int64 And_Int64Int64(int64 A, int64 B); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | int64 | First operand. | — |
| B | int64 | Second operand (typically a bitmask). | — |
Return Type
int64 Example
Test whether a specific permission flag is set C++
const int64 WriteFlag = (1LL << 3);
int64 Permissions = GetPermissions();
bool bCanWrite = UKismetMathLibrary::And_Int64Int64(Permissions, WriteFlag) != 0; See Also
Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?