UKismetMathLibrary::Less_ByteByte
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns true if byte A is strictly less than byte B (A < B).
Caveats & Gotchas
- • Comparisons on uint8 are unsigned — there are no negative byte values, so A < B behaves identically to signed comparison for values 0–127 but gives different results if you are storing a conceptually-signed value in a uint8.
- • In C++ prefer a direct `A < B` expression; this function exists primarily to expose the operator as a Blueprint node.
Signature
static UE_INL_API bool Less_ByteByte(uint8 A, uint8 B); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | uint8 | Left-hand operand. | — |
| B | uint8 | Right-hand operand. | — |
Return Type
bool Example
Guarding against underflow before subtraction C++
if (UKismetMathLibrary::Less_ByteByte(CurrentAmmo, Cost))
{
// Not enough ammo
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?