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