Navigation
API > API/Runtime > API/Runtime/Core
| Name | FUnitConversion |
| Type | struct |
| Header File | /Engine/Source/Runtime/Core/Public/Math/UnitConversion.h |
| Include Path | #include "Math/UnitConversion.h" |
Syntax
struct FUnitConversion
Functions
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Check whether it is possible to convert a number between the two specified units | Math/UnitConversion.h | ||
| Quantizes this number to the most appropriate unit for user friendly presentation (e.g. 1000m returns 1km), adhereing to global display settings. | Math/UnitConversion.h | ||
| Convert the specified number from one unit to another. Does nothing if the units are incompatible. | Math/UnitConversion.h | ||
static TConstArrayView< const TCHAR * > GetSupportedUnits() |
Helper function to get all supported units | Math/UnitConversion.h | |
static const TCHAR * GetUnitDisplayString
(
EUnit Unit |
Get the display string for the the specified unit type | Math/UnitConversion.h | |
| Get the type of the specified unit | Math/UnitConversion.h | ||
| Check whether a unit is of the specified type | Math/UnitConversion.h | ||
static FNumericUnit< T > QuantizeUnitsToBestFit
(
T Value, |
Quantizes this number to the most appropriate unit for user friendly presentation (e.g. 1000m returns 1km). | Math/UnitConversion.h | |
static FUnitSettings & Settings() |
Get the global settings for unit conversion/display | Math/UnitConversion.h | |
static TOptional< EUnit > UnitFromString
(
const TCHAR* UnitString |
Helper function to find a unit from a string (name or display string) | Math/UnitConversion.h |