RealDocs

UKismetMathLibrary::Min

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

Description

Returns the smaller of two integers. Equivalent to FMath::Min for int32 but exposed to Blueprints.

Caveats & Gotchas

  • The Blueprint node is marked as CommutativeAssociative, meaning the graph compiler can reorder inputs freely. Do not rely on A being evaluated before B if either operand has side effects (though pure nodes generally should not).
  • This is int32-only. For float use FMath::Min or the float variant of the Blueprint node. For int64 there is no direct Kismet wrapper — use the ternary operator in C++.

Signature

static UE_INL_API int32 Min(int32 A, int32 B);

Parameters

Name Type Description Default
A int32 First value.
B int32 Second value.

Return Type

int32

Example

Cap damage to remaining health C++
int32 ActualDamage = UKismetMathLibrary::Min(IncomingDamage, CurrentHealth);
CurrentHealth -= ActualDamage;

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.