RealDocs

UKismetMathLibrary::LessEqual_ByteByte

function Engine Blueprint Since 4.0
#include "Kismet/KismetMathLibrary.h"
Access: public Specifiers: staticUFUNCTIONBlueprintPure

Description

Returns true if byte A is less than or equal to byte B (A <= B).

Caveats & Gotchas

  • Because uint8 never holds negative values, `LessEqual_ByteByte(0, X)` is always true for any X — a common source of unexpected always-true branches.
  • Do not use to detect 'at or below zero' for conceptually signed quantities stored in uint8; convert to int32 first.

Signature

static UE_INL_API bool LessEqual_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 capacity C++
if (UKismetMathLibrary::LessEqual_ByteByte(CurrentCount, MaxCapacity))
{
    AddItem();
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.