LocalizationFormatNumber Method (Double, UnitSystem, DistanceDisplayMode, Int32, Boolean) |
Get a string version of a number in a given unit system / display mode.
Namespace:
Rhino.UI
Assembly:
RhinoCommon (in RhinoCommon.dll)
Since: 5.0
Syntax public static string FormatNumber(
double x,
UnitSystem units,
DistanceDisplayMode mode,
int precision,
bool appendUnitSystemName
)
Public Shared Function FormatNumber (
x As Double,
units As UnitSystem,
mode As DistanceDisplayMode,
precision As Integer,
appendUnitSystemName As Boolean
) As String
Parameters
- x
- Type: SystemDouble
The number to format into a string. - units
- Type: RhinoUnitSystem
The unit system for the number. - mode
- Type: Rhino.UIDistanceDisplayMode
How the number should be formatted. - precision
- Type: SystemInt32
The precision of the number. - appendUnitSystemName
- Type: SystemBoolean
Adds unit system name to the end of the number.
Return Value
Type:
StringThe formatted number.
See Also