Click or drag to resize

LocalizationFormatNumber Method

Get a string version of a number in a given unit system / display mode.

Namespace:  Rhino.UI
Assembly:  RhinoCommon (in RhinoCommon.dll)
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.
Version Information

Rhino for Mac

Supported in: 5.4

Rhino for Windows

Supported in: 6.6
See Also