RealDocs

UKismetMathLibrary::GetMin2D

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

Description

Returns the smaller of the vector's X and Y components, preserving sign.

Caveats & Gotchas

  • Returns the signed minimum. For a vector like (100, -5), GetMin2D returns -5, not 5. This can be counter-intuitive when both components are negative.
  • Returns a scalar — which axis held the minimum is not retained.

Signature

static UE_INL_API double GetMin2D(FVector2D A);

Parameters

Name Type Description Default
A FVector2D Input 2D vector.

Return Type

double

Example

Find the minimum extent for uniform 2D padding C++
FVector2D Extent = FVector2D(200.f, 150.f);
double MinExtent = UKismetMathLibrary::GetMin2D(Extent); // 150
float Padding = static_cast<float>(MinExtent) * 0.1f;

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.