RealDocs

UKismetMathLibrary::Less_IntInt

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

Description

Returns true if integer A is strictly less than integer B (A < B).

Caveats & Gotchas

  • Comparing values that resulted from signed integer overflow is undefined behaviour in C++ — sanitise or clamp before comparing when overflow is possible.
  • For Blueprint-only projects, prefer the built-in `<` node; this function is the C++ call name that the node maps to and is rarely called explicitly in game code.

Signature

static UE_INL_API bool Less_IntInt(int32 A, int32 B);

Parameters

Name Type Description Default
A int32 Left-hand operand.
B int32 Right-hand operand.

Return Type

bool

Example

Bounds check on array index C++
if (UKismetMathLibrary::Less_IntInt(Index, Array.Num()))
{
    return Array[Index];
}

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.