Click or drag to resize

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
)

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