SmallNumberTypeFormat Method |
Formats the value into a human friendly string.
Namespace:
KSPDev.GUIUtils.TypeFormatters
Assembly:
KSPDev_Utils.2.0 (in KSPDev_Utils.2.0.dll) Version: 2.0 for KSP v1.8+
Syntax public static string Format(
double value,
string format = null
)
Request Example
View SourceParameters
- value
- Type: SystemDouble
The unscaled numeric value to format. - format (Optional)
- Type: SystemString
The specific float number format to use. If the format is not specified, then it's choosen
basing on the value.
Return Value
Type:
StringA formatted and localized string
Remarks
When the value is below 1000, the method tries to present the result in as smal digits
as possible. If the value is greater, then the whole integer part is shown and the fractionap
part is hidden.
See Also