RealDocs

UKismetMathLibrary::Vector_GetAbsMin

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

Description

Returns the smallest absolute value among the three components: min(|X|, |Y|, |Z|). Identifies the axis with the least contribution, useful for finding near-perpendicular axes or degenerate directions.

Caveats & Gotchas

  • The return value is always non-negative. A component of -0.001 gives 0.001, not -0.001.
  • Unlike GetMinElement, this uses absolute values — it finds the smallest-magnitude component, not the most-negative one.
  • Can be used to detect near-zero components, but FVector::IsNearlyZero is typically more appropriate for that check.

Signature

static UE_INL_API double Vector_GetAbsMin(FVector A);

Parameters

Name Type Description Default
A FVector The vector to inspect.

Return Type

double

Example

Find the least-dominant axis of a direction vector C++
FVector Dir = GetActorForwardVector();
double MinAbs = UKismetMathLibrary::Vector_GetAbsMin(Dir);
// MinAbs is close to 0 for cardinal-aligned directions,
// meaning that axis contributes the least to the direction

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.