RealDocs

UKismetMathLibrary::Vector_GetAbsMax

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

Description

Returns the largest absolute value among the three components of a vector: max(|X|, |Y|, |Z|). Useful for finding the dominant axis regardless of sign, or computing the Chebyshev (L-infinity) norm.

Caveats & Gotchas

  • The return value is always non-negative, even if all components of the input are negative.
  • Unlike GetMaxElement, this uses absolute values — a vector of (-100, 5, 3) returns 100, not 5.
  • This gives the L-infinity (Chebyshev) norm, not the Euclidean length. Don't confuse it with Size() or SizeSquared().

Signature

static UE_INL_API double Vector_GetAbsMax(FVector A);

Parameters

Name Type Description Default
A FVector The vector to inspect.

Return Type

double

Example

Find the most significant component offset C++
FVector Delta = TargetPos - CurrentPos;
double LargestChange = UKismetMathLibrary::Vector_GetAbsMax(Delta);
// LargestChange is the biggest single-axis displacement, ignoring sign

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.