Ark Server API (ASA) - Wiki
|
#include <UnitConversion.h>
Static Public Member Functions | |
static FUnitSettings & | Settings () |
static bool | AreUnitsCompatible (EUnit From, EUnit To) |
static bool | IsUnitOfType (EUnit Unit, EUnitType Type) |
static EUnitType | GetUnitType (EUnit) |
static const TCHAR * | GetUnitDisplayString (EUnit Unit) |
static TOptional< EUnit > | UnitFromString (const TCHAR *UnitString) |
template<typename T > | |
static T | Convert (T InValue, EUnit From, EUnit To) |
template<typename T > | |
static FNumericUnit< T > | QuantizeUnitsToBestFit (T Value, EUnit Units) |
template<typename T > | |
static EUnit | CalculateDisplayUnit (T Value, EUnit InUnits) |
Definition at line 106 of file UnitConversion.h.
Check whether it is possible to convert a number between the two specified units
Quantizes this number to the most appropriate unit for user friendly presentation (e.g. 1000m returns 1km), adhereing to global display settings.
Definition at line 169 of file UnitConversion.inl.
Convert the specified number from one unit to another. Does nothing if the units are incompatible.
Definition at line 64 of file UnitConversion.inl.
Get the display string for the the specified unit type
Check whether a unit is of the specified type
|
static |
Quantizes this number to the most appropriate unit for user friendly presentation (e.g. 1000m returns 1km).
Definition at line 114 of file UnitConversion.inl.
|
static |
Get the global settings for unit conversion/display
Helper function to find a unit from a string (name or display string)