UKismetMathLibrary::Greater_ByteByte
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns true if byte A is strictly greater than byte B (A > B).
Caveats & Gotchas
- • uint8 is unsigned so values wrap at 255; if A was produced by unchecked addition it may wrap to a small number, falsely returning false.
- • In C++ a direct `A > B` comparison is equivalent and typically faster due to inlining; the function is mainly for Blueprint graphs.
Signature
static UE_INL_API bool Greater_ByteByte(uint8 A, uint8 B); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | uint8 | Left-hand operand. | — |
| B | uint8 | Right-hand operand. | — |
Return Type
bool Example
Checking ammo before firing C++
bool bCanFire = UKismetMathLibrary::Greater_ByteByte(CurrentAmmo, 0); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?