UKismetMathLibrary::LessEqual_IntInt
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns true if integer A is less than or equal to integer B (A <= B).
Caveats & Gotchas
- • A common misuse is writing `LessEqual_IntInt(Health, 0)` to check for death; this also triggers when Health is a large negative number from an overflow bug rather than genuine depletion — add a lower-clamp if that distinction matters.
- • This function is the C++ name of the Blueprint `<=` integer node; prefer the operator directly in C++ code for readability.
Signature
static UE_INL_API bool LessEqual_IntInt(int32 A, int32 B); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | int32 | Left-hand operand. | — |
| B | int32 | Right-hand operand. | — |
Return Type
bool Example
Death check C++
if (UKismetMathLibrary::LessEqual_IntInt(Health, 0))
{
Die();
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?