Localization.FormatNumber Method

LocalizationFormatNumber Method

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: String
The formatted number.
See Also