UKismetMathLibrary::MinInt64
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns the smaller of A and B. Prefer this over a manual Less_Int64Int64 branch when both values are already computed.
Caveats & Gotchas
- • No special handling for INT64_MIN — if both values equal INT64_MIN the result is INT64_MIN, which is correct, but subsequent arithmetic on the result can still overflow.
- • Blueprint marks this as CommutativeAssociativeBinaryOperator, meaning the node can collapse into a single multi-input MIN node. Inspect your graph if you see unexpected multi-input MIN nodes after copy-pasting.
Signature
static UE_INL_API int64 MinInt64(int64 A, int64 B); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | int64 | First value. | — |
| B | int64 | Second value. | — |
Return Type
int64 Example
Cap a transfer amount to available balance C++
int64 Requested = GetRequestedAmount();
int64 Balance = GetAccountBalance();
int64 Transfer = UKismetMathLibrary::MinInt64(Requested, Balance);
ApplyTransfer(Transfer); Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?