Description:
Get a string version of a number in a given unit system / display mode.
Syntax:
public static string FormatNumber(
double x,
UnitSystem units,
DistanceDisplayMode mode,
int precision,
bool appendUnitSystemName
)
double x,
UnitSystem units,
DistanceDisplayMode mode,
int precision,
bool appendUnitSystemName
)
Parameters:
- x
- Type: double
- The number to format into a string.
- units
- Type: UnitSystem
- The unit system for the number.
- mode
- Type: DistanceDisplayMode
- How the number should be formatted.
- precision
- Type: int
- The precision of the number.
- appendUnitSystemName
- Type: bool
- Adds unit system name to the end of the number.
Returns:
Type: string
The formatted number.
Available since:
5.0