UKismetMathLibrary::GetMinElement
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns the smallest of the three component values (X, Y, or Z) of a vector. Useful for finding the tightest bound on a bounding box axis or for axis-sorting logic.
Caveats & Gotchas
- • Returns the raw minimum component value, not its absolute value. A vector with large negative components will return a large negative number.
- • This checks all three components including Z. If you only care about the 2D minimum, compare X and Y explicitly.
- • For the minimum absolute component, use Vector_GetAbsMin instead.
Signature
static UE_INL_API double GetMinElement(FVector A); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | FVector | The vector to inspect. | — |
Return Type
double Example
Find the tightest axis extent of a bounds vector C++
FVector Extent = MyBox.GetExtent();
double SmallestExtent = UKismetMathLibrary::GetMinElement(Extent);
// SmallestExtent is the shortest axis of the box Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?