Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FUnitConversion Struct Reference

#include <UnitConversion.h>

Static Public Member Functions

static FUnitSettingsSettings ()
 
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< EUnitUnitFromString (const TCHAR *UnitString)
 
template<typename T >
static T Convert (T InValue, EUnit From, EUnit To)
 
template<typename T >
static FNumericUnit< TQuantizeUnitsToBestFit (T Value, EUnit Units)
 
template<typename T >
static EUnit CalculateDisplayUnit (T Value, EUnit InUnits)
 

Detailed Description

Definition at line 106 of file UnitConversion.h.

Member Function Documentation

◆ AreUnitsCompatible()

static bool FUnitConversion::AreUnitsCompatible ( EUnit From,
EUnit To )
static

Check whether it is possible to convert a number between the two specified units

◆ CalculateDisplayUnit()

template<typename T >
EUnit FUnitConversion::CalculateDisplayUnit ( T Value,
EUnit InUnits )
static

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()

template<typename T >
T FUnitConversion::Convert ( T InValue,
EUnit From,
EUnit To )
static

Convert the specified number from one unit to another. Does nothing if the units are incompatible.

Definition at line 64 of file UnitConversion.inl.

◆ GetUnitDisplayString()

static const TCHAR * FUnitConversion::GetUnitDisplayString ( EUnit Unit)
static

Get the display string for the the specified unit type

◆ GetUnitType()

static EUnitType FUnitConversion::GetUnitType ( EUnit )
static

Get the type of the specified unit

◆ IsUnitOfType()

static bool FUnitConversion::IsUnitOfType ( EUnit Unit,
EUnitType Type )
static

Check whether a unit is of the specified type

◆ QuantizeUnitsToBestFit()

template<typename T >
FNumericUnit< T > FUnitConversion::QuantizeUnitsToBestFit ( T Value,
EUnit Units )
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.

◆ Settings()

static FUnitSettings & FUnitConversion::Settings ( )
static

Get the global settings for unit conversion/display

◆ UnitFromString()

static TOptional< EUnit > FUnitConversion::UnitFromString ( const TCHAR * UnitString)
static

Helper function to find a unit from a string (name or display string)


The documentation for this struct was generated from the following files: