RealDocs

UKismetMathLibrary::FMin

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

Description

Returns the smaller of two floating-point values. Blueprint equivalent of FMath::Min for floats.

Caveats & Gotchas

  • If either input is NaN the result is implementation-defined — FMath::Min propagates NaN on some platforms, so sanitize inputs if NaN is possible in your data.
  • In C++ you can call FMath::Min directly; this wrapper exists primarily so the node is available in Blueprint graphs.

Signature

static UE_INL_API double FMin(double A, double B);

Parameters

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

Return Type

double

Example

Clamp damage to available health C++
float Damage = 150.0f;
float Health = 100.0f;
float ActualDamage = UKismetMathLibrary::FMin(Damage, Health);

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.